FileDocCategorySizeDatePackage
SubjectKeyIdentifierStructure.javaAPI DocAndroid 1.5 API1810Wed May 06 22:41:06 BST 2009org.bouncycastle.x509.extension

SubjectKeyIdentifierStructure

public class SubjectKeyIdentifierStructure extends org.bouncycastle.asn1.x509.SubjectKeyIdentifier
A high level subject key identifier.

Fields Summary
private org.bouncycastle.asn1.x509.AuthorityKeyIdentifier
authKeyID
Constructors Summary
public SubjectKeyIdentifierStructure(byte[] encodedValue)
Constructor which will take the byte[] returned from getExtensionValue()

param
encodedValue a DER octet encoded string with the extension structure in it.
throws
IOException on parsing errors.

        super((ASN1OctetString)X509ExtensionUtil.fromExtensionValue(encodedValue));
    
public SubjectKeyIdentifierStructure(PublicKey pubKey)

        super(fromPublicKey(pubKey));
    
Methods Summary
private static org.bouncycastle.asn1.ASN1OctetStringfromPublicKey(java.security.PublicKey pubKey)

        try
        {
            SubjectPublicKeyInfo info = new SubjectPublicKeyInfo(
                (ASN1Sequence)new ASN1InputStream(pubKey.getEncoded()).readObject());

            return (ASN1OctetString)(new SubjectKeyIdentifier(info).toASN1Object());
        }
        catch (Exception e)
        {
            throw new CertificateParsingException("Exception extracting certificate details: " + e.toString());
        }