FileDocCategorySizeDatePackage
SignerIdentifier.javaAPI DocAndroid 1.5 API2345Wed May 06 22:41:06 BST 2009org.bouncycastle.asn1.cms

SignerIdentifier

public class SignerIdentifier extends org.bouncycastle.asn1.ASN1Encodable

Fields Summary
private org.bouncycastle.asn1.DEREncodable
id
Constructors Summary
public SignerIdentifier(IssuerAndSerialNumber id)

        this.id = id;
    
public SignerIdentifier(org.bouncycastle.asn1.ASN1OctetString id)

        this.id = new DERTaggedObject(false, 0, id);
    
public SignerIdentifier(org.bouncycastle.asn1.DERObject id)

        this.id = id;
    
Methods Summary
public org.bouncycastle.asn1.DEREncodablegetId()

        if (id instanceof ASN1TaggedObject)
        {
            return ASN1OctetString.getInstance((ASN1TaggedObject)id, false);
        }

        return id;
    
public static org.bouncycastle.asn1.cms.SignerIdentifiergetInstance(java.lang.Object o)
return a SignerIdentifier object from the given object.

param
o the object we want converted.
exception
IllegalArgumentException if the object cannot be converted.

        if (o == null || o instanceof SignerIdentifier)
        {
            return (SignerIdentifier)o;
        }
        
        if (o instanceof IssuerAndSerialNumber)
        {
            return new SignerIdentifier((IssuerAndSerialNumber)o);
        }
        
        if (o instanceof ASN1OctetString)
        {
            return new SignerIdentifier((ASN1OctetString)o);
        }
        
        if (o instanceof DERObject)
        {
            return new SignerIdentifier((DERObject)o);
        }
        
        throw new IllegalArgumentException(
             "Illegal object in SignerIdentifier: " + o.getClass().getName());
    
public booleanisTagged()

        return (id instanceof ASN1TaggedObject);
    
public org.bouncycastle.asn1.DERObjecttoASN1Object()
Produce an object suitable for an ASN1OutputStream.
SignerIdentifier ::= CHOICE {
issuerAndSerialNumber IssuerAndSerialNumber,
subjectKeyIdentifier [0] SubjectKeyIdentifier
}

SubjectKeyIdentifier ::= OCTET STRING

        return id.getDERObject();