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 RFC 5652):
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(iaik.asn1.ASN1Object obj)
Creates an OriginatorPublicKey from an ASN1Object.
|
OriginatorPublicKey(iaik.asn1.ASN1Object obj,
SecurityProvider securityProvider)
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(iaik.asn1.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. |
iaik.asn1.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(iaik.asn1.ASN1Object obj)
throws iaik.asn1.CodingException
obj - the OriginatorPublicKey as ASN1Objectiaik.asn1.CodingException - if the ASN1Object cannot be decoded or
is invalid structuredpublic OriginatorPublicKey(iaik.asn1.ASN1Object obj,
SecurityProvider securityProvider)
throws iaik.asn1.CodingException
obj - the OriginatorPublicKey as ASN1ObjectsecurityProvider - the SecurityProvider to be used by this object, if null use the
default system-wide installed SecurityProvider; SecurityProvider method
getKeyFactory
may be required to get a KeyFactory required for parsing the encoded keyiaik.asn1.CodingException - if the ASN1Object cannot be decoded or
is invalid structuredpublic java.security.PublicKey getPublicKey()
public void decode(iaik.asn1.ASN1Object obj)
throws iaik.asn1.CodingException
decode in interface iaik.asn1.ASN1Typeobj - the OriginatorPublicKey as ASN1Objectiaik.asn1.CodingException - if the ASN1Object cannot be decoded or
is invalid structuredpublic iaik.asn1.ASN1Object toASN1Object()
throws iaik.asn1.CodingException
toASN1Object in interface iaik.asn1.ASN1Typeiaik.asn1.CodingException - 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