| Constructor and Description |
|---|
RawPublicKeyIdentity(byte[] subjectInfo)
Creates a new instance for a given ASN.1 subject public key info structure.
|
RawPublicKeyIdentity(byte[] subjectInfo,
String keyAlgorithm)
Creates a new instance for a given ASN.1 subject public key info structure.
|
RawPublicKeyIdentity(PublicKey key)
Creates a new instance for a given public key.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Checks if this instance is equal to another object.
|
PublicKey |
getKey()
Gets the raw public key.
|
String |
getName()
Gets the Named Information URI representing this raw public key.
|
byte[] |
getSubjectInfo()
Gets the key's ASN.1 encoded SubjectPublicKeyInfo.
|
int |
hashCode()
Creates a hash code based on the key's ASN.1 encoded SubjectPublicKeyInfo.
|
String |
toString()
Gets a string representation of this principal.
|
public RawPublicKeyIdentity(PublicKey key)
key - the public keyNullPointerException - if the key is nullpublic RawPublicKeyIdentity(byte[] subjectInfo)
throws GeneralSecurityException
The given subject info is expected to represent an EC public key.
subjectInfo - the ASN.1 encoded X.509 subject public key info.NullPointerException - if the subject info is nullGeneralSecurityException - if the JVM does not support the key
algorithm used by the public key.public RawPublicKeyIdentity(byte[] subjectInfo,
String keyAlgorithm)
throws GeneralSecurityException
subjectInfo - the ASN.1 encoded X.509 subject public key info.keyAlgorithm - the algorithm name to verify, that the subject public
key uses this key algorithm, or to support currently not
supported key algorithms for serialization/deserialization. If
null, use the to key algorithm provided by the ASN.1
DER encoded subject public key.NullPointerException - if the subject info is nullGeneralSecurityException - if the JVM does not support the given key algorithm.public final String getName()
public final PublicKey getKey()
public final byte[] getSubjectInfo()
public String toString()
public int hashCode()
Copyright © 2019 Eclipse Foundation. All rights reserved.