org.bouncycastle.asn1.cms

Class OriginatorIdentifierOrKey

public class OriginatorIdentifierOrKey extends ASN1Encodable

Constructor Summary
OriginatorIdentifierOrKey(IssuerAndSerialNumber id)
OriginatorIdentifierOrKey(ASN1OctetString id)
OriginatorIdentifierOrKey(OriginatorPublicKey id)
OriginatorIdentifierOrKey(DERObject id)
Method Summary
DEREncodablegetId()
static OriginatorIdentifierOrKeygetInstance(ASN1TaggedObject o, boolean explicit)
return an OriginatorIdentifierOrKey object from a tagged object.
static OriginatorIdentifierOrKeygetInstance(Object o)
return an OriginatorIdentifierOrKey object from the given object.
OriginatorPublicKeygetOriginatorKey()
DERObjecttoASN1Object()
Produce an object suitable for an ASN1OutputStream.

Constructor Detail

OriginatorIdentifierOrKey

public OriginatorIdentifierOrKey(IssuerAndSerialNumber id)

OriginatorIdentifierOrKey

public OriginatorIdentifierOrKey(ASN1OctetString id)

OriginatorIdentifierOrKey

public OriginatorIdentifierOrKey(OriginatorPublicKey id)

OriginatorIdentifierOrKey

public OriginatorIdentifierOrKey(DERObject id)

Method Detail

getId

public DEREncodable getId()

getInstance

public static OriginatorIdentifierOrKey getInstance(ASN1TaggedObject o, boolean explicit)
return an OriginatorIdentifierOrKey object from a tagged object.

Parameters: o the tagged object holding the object we want. explicit true if the object is meant to be explicitly tagged false otherwise.

Throws: IllegalArgumentException if the object held by the tagged object cannot be converted.

getInstance

public static OriginatorIdentifierOrKey getInstance(Object o)
return an OriginatorIdentifierOrKey object from the given object.

Parameters: o the object we want converted.

Throws: IllegalArgumentException if the object cannot be converted.

getOriginatorKey

public OriginatorPublicKey getOriginatorKey()

toASN1Object

public DERObject toASN1Object()
Produce an object suitable for an ASN1OutputStream.
 OriginatorIdentifierOrKey ::= CHOICE {
     issuerAndSerialNumber IssuerAndSerialNumber,
     subjectKeyIdentifier [0] SubjectKeyIdentifier,
     originatorKey [1] OriginatorPublicKey 
 }

 SubjectKeyIdentifier ::= OCTET STRING