FileDocCategorySizeDatePackage
SignerInfo.javaAPI DocAndroid 1.5 API8381Wed May 06 22:41:06 BST 2009org.apache.harmony.security.pkcs7

SignerInfo

public class SignerInfo extends Object
As defined in PKCS #7: Cryptographic Message Syntax Standard (http://www.ietf.org/rfc/rfc2315.txt) SignerInfo ::= SEQUENCE { version Version, issuerAndSerialNumber IssuerAndSerialNumber, digestAlgorithm DigestAlgorithmIdentifier, authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL, digestEncryptionAlgorithm DigestEncryptionAlgorithmIdentifier, encryptedDigest EncryptedDigest, unauthenticatedAttributes [1] IMPLICIT Attributes OPTIONAL }

Fields Summary
private int
version
private X500Principal
issuer
private BigInteger
serialNumber
private org.apache.harmony.security.x509.AlgorithmIdentifier
digestAlgorithm
private AuthenticatedAttributes
authenticatedAttributes
private org.apache.harmony.security.x509.AlgorithmIdentifier
digestEncryptionAlgorithm
private byte[]
encryptedDigest
private List
unauthenticatedAttributes
public static final org.apache.harmony.security.asn1.ASN1Sequence
ISSUER_AND_SERIAL_NUMBER
public static final org.apache.harmony.security.asn1.ASN1Sequence
ASN1
Constructors Summary
public SignerInfo(int version, Object[] issuerAndSerialNumber, org.apache.harmony.security.x509.AlgorithmIdentifier digestAlgorithm, AuthenticatedAttributes authenticatedAttributes, org.apache.harmony.security.x509.AlgorithmIdentifier digestEncryptionAlgorithm, byte[] encryptedDigest, List unauthenticatedAttributes)

        this.version = version;
        this.issuer = ((Name)issuerAndSerialNumber[0]).getX500Principal();
        // BEGIN android-changed
        this.serialNumber = ASN1Integer.toBigIntegerValue(issuerAndSerialNumber[1]);
        // END android-changed
        this.digestAlgorithm = digestAlgorithm;
        this.authenticatedAttributes = authenticatedAttributes;
        this.digestEncryptionAlgorithm = digestEncryptionAlgorithm;
        this.encryptedDigest = encryptedDigest;
        this.unauthenticatedAttributes = unauthenticatedAttributes;
    
Methods Summary
public java.util.ListgetAuthenticatedAttributes()

        if (authenticatedAttributes == null) {
            return null;
        }
        return authenticatedAttributes.getAttributes();
    
public java.lang.StringgetDigestAlgorithm()

        return digestAlgorithm.getAlgorithm();
    
public java.lang.StringgetDigestEncryptionAlgorithm()

        return digestEncryptionAlgorithm.getAlgorithm();
    
public byte[]getEncodedAuthenticatedAttributes()

        if (authenticatedAttributes == null) {
            return null;
        }
        return authenticatedAttributes.getEncoded();
    
public byte[]getEncryptedDigest()

        return encryptedDigest;
    
public javax.security.auth.x500.X500PrincipalgetIssuer()

        return issuer;
    
public java.math.BigIntegergetSerialNumber()

        return serialNumber;
    
public java.lang.StringgetdigestAlgorithm()

        return digestAlgorithm.getAlgorithm();
    
public java.lang.StringtoString()

        StringBuffer res = new StringBuffer();
        res.append("-- SignerInfo:"); //$NON-NLS-1$
        res.append("\n version : "); //$NON-NLS-1$
        res.append(version);
        res.append("\nissuerAndSerialNumber:  "); //$NON-NLS-1$
        res.append(issuer);
        res.append("   "); //$NON-NLS-1$
        res.append(serialNumber);
        res.append("\ndigestAlgorithm:  "); //$NON-NLS-1$
        res.append(digestAlgorithm.toString());
        res.append("\nauthenticatedAttributes:  "); //$NON-NLS-1$
        if (authenticatedAttributes != null) {
            res.append(authenticatedAttributes.toString());
        }
        res.append("\ndigestEncryptionAlgorithm: "); //$NON-NLS-1$
        res.append(digestEncryptionAlgorithm.toString());
        res.append("\nunauthenticatedAttributes: "); //$NON-NLS-1$
        if (unauthenticatedAttributes != null) {
            res.append(unauthenticatedAttributes.toString());
        }
        res.append("\n-- SignerInfo End\n"); //$NON-NLS-1$
        return res.toString();