public class OriginatorPublicKey extends java.lang.Object implements KeyIdentifier
The OriginatorPublicKey type is used as one alternative for identifying the public
key of the originator within a KeyAgreeRecipientInfo (see CMS
Cryptographic Message Syntax, RFC 2630):
OriginatorPublicKey ::= SEQUENCE {
algorithm AlgorithmIdentifier
publicKey BIT STRING }
ISSUER_AND_SERIALNUMBER, KEK_IDENTIFIER, ORIGINATOR_PUBLIC_KEY, RECIPIENT_KEY_IDENTIFIER, SUBJECT_KEY_IDENTIFIER| Constructor and Description |
|---|
OriginatorPublicKey()
Empty default constructor.
|
OriginatorPublicKey(ASN1Object obj)
Creates an OriginatorPublicKey from an ASN1Object.
|
OriginatorPublicKey(java.security.PublicKey publicKey)
Creates a OriginatorPublicKey for the given public key.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decode(ASN1Object obj)
Decodes the OriginatorPublicKey from the given ASN1Object.
|
boolean |
equals(java.lang.Object obj)
Compares this
OriginatorPublicKey to the specified object. |
int |
getKeyIdType()
Returns the key identifier type this class represents.
|
java.lang.String |
getKeyIdTypeName()
Returns the key identifier type this class represents as string.
|
java.security.PublicKey |
getPublicKey()
Gets the public key.
|
int |
hashCode()
Returns a hashcode for this
OriginatorPublicKey. |
ASN1Object |
toASN1Object()
Returns this OriginatorPublicKey as ASN1Object.
|
java.lang.String |
toString()
Returns a String representation of this OriginatorPublicKey.
|
public OriginatorPublicKey()
Used for dynamic object creation only. Shall be not used by an application.
public OriginatorPublicKey(java.security.PublicKey publicKey)
publicKey - the public keypublic OriginatorPublicKey(ASN1Object obj) throws CodingException
obj - the OriginatorPublicKey as ASN1ObjectCodingException - if the ASN1Object cannot be decoded or
is invalid structuredpublic java.security.PublicKey getPublicKey()
public void decode(ASN1Object obj) throws CodingException
decode in interface ASN1Typeobj - the OriginatorPublicKey as ASN1ObjectCodingException - if the ASN1Object cannot be decoded or
is invalid structuredpublic ASN1Object toASN1Object() throws CodingException
toASN1Object in interface ASN1TypeCodingException - if this OriginatorPublicKey cannot be represented
as ASN.1 objectpublic boolean equals(java.lang.Object obj)
OriginatorPublicKey to the specified object.equals in interface KeyIdentifierequals in class java.lang.Objectobj - the object to compare this OriginatorPublicKey
against.true, if the given object is equal to this
OriginatorPublicKey,
false otherwisepublic int hashCode()
OriginatorPublicKey.hashCode in interface KeyIdentifierhashCode in class java.lang.ObjectOriginatorPublicKeypublic int getKeyIdType()
getKeyIdType in interface KeyIdentifierpublic java.lang.String getKeyIdTypeName()
getKeyIdTypeName in interface KeyIdentifierpublic java.lang.String toString()
toString in interface KeyIdentifiertoString in class java.lang.Object