FileDocCategorySizeDatePackage
SubjectKeyIdentifier.javaAPI DocAndroid 1.5 API2725Wed May 06 22:41:06 BST 2009org.apache.harmony.security.x509

SubjectKeyIdentifier

public class SubjectKeyIdentifier extends ExtensionValue
Subject Key Identifier Extension (OID = 2.5.29.14). The ASN.1 definition for extension is:
id-ce-subjectKeyIdentifier OBJECT IDENTIFIER ::= { id-ce 14 }

SubjectKeyIdentifier ::= KeyIdentifier

KeyIdentifier ::= OCTET STRING
(as specified in RFC 3280 http://www.ietf.org/rfc/rfc3280.txt)

Fields Summary
private final byte[]
keyIdentifier
Constructors Summary
public SubjectKeyIdentifier(byte[] keyIdentifier)
Creates the object on the base of the value of key identifier.

        this.keyIdentifier = keyIdentifier;
    
Methods Summary
public static org.apache.harmony.security.x509.SubjectKeyIdentifierdecode(byte[] encoding)
Creates an object on the base of its encoded form.

        SubjectKeyIdentifier res = new SubjectKeyIdentifier((byte[])
                ASN1OctetString.getInstance().decode(encoding));
        res.encoding = encoding;
        return res;
    
public voiddumpValue(java.lang.StringBuffer buffer, java.lang.String prefix)
Places the string representation of extension value into the StringBuffer object.

        buffer.append(prefix).append("SubjectKeyIdentifier: [\n"); //$NON-NLS-1$
        buffer.append(Array.toString(keyIdentifier, prefix));
        buffer.append(prefix).append("]\n"); //$NON-NLS-1$
    
public byte[]getEncoded()
Returns ASN.1 encoded form of extension.

return
a byte array containing ASN.1 encoded form.

        if (encoding == null) {
            encoding = ASN1OctetString.getInstance().encode(keyIdentifier);
        }
        return encoding;