Package org.bouncycastle.asn1.x509
Class SubjectKeyIdentifier
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.x509.SubjectKeyIdentifier
- All Implemented Interfaces:
ASN1Encodable
- Direct Known Subclasses:
SubjectKeyIdentifierStructure
public class SubjectKeyIdentifier extends ASN1Object
The SubjectKeyIdentifier object.
SubjectKeyIdentifier::= OCTET STRING
-
Constructor Summary
Constructors Modifier Constructor Description SubjectKeyIdentifier(byte[] keyid)protectedSubjectKeyIdentifier(ASN1OctetString keyid)SubjectKeyIdentifier(SubjectPublicKeyInfo spki)Deprecated. -
Method Summary
Modifier and Type Method Description static SubjectKeyIdentifiercreateSHA1KeyIdentifier(SubjectPublicKeyInfo keyInfo)Deprecated.use org.bouncycastle.cert.X509ExtensionUtils.createSubjectKeyIdentifierstatic SubjectKeyIdentifiercreateTruncatedSHA1KeyIdentifier(SubjectPublicKeyInfo keyInfo)Deprecated.use org.bouncycastle.cert.X509ExtensionUtils.createTruncatedSubjectKeyIdentifierstatic SubjectKeyIdentifierfromExtensions(Extensions extensions)static SubjectKeyIdentifiergetInstance(Object obj)static SubjectKeyIdentifiergetInstance(ASN1TaggedObject obj, boolean explicit)byte[]getKeyIdentifier()ASN1PrimitivetoASN1Primitive()Methods inherited from class org.bouncycastle.asn1.ASN1Object
equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object
-
Constructor Details
-
SubjectKeyIdentifier
public SubjectKeyIdentifier(byte[] keyid) -
SubjectKeyIdentifier
-
SubjectKeyIdentifier
Deprecated.Calculates the keyidentifier using a SHA1 hash over the BIT STRING from SubjectPublicKeyInfo as defined in RFC3280.- Parameters:
spki- the subject public key info.
-
-
Method Details
-
getInstance
-
getInstance
-
fromExtensions
-
getKeyIdentifier
public byte[] getKeyIdentifier() -
toASN1Primitive
- Specified by:
toASN1Primitivein interfaceASN1Encodable- Specified by:
toASN1Primitivein classASN1Object
-
createSHA1KeyIdentifier
Deprecated.use org.bouncycastle.cert.X509ExtensionUtils.createSubjectKeyIdentifierReturn a RFC 3280 type 1 key identifier. As in:(1) The keyIdentifier is composed of the 160-bit SHA-1 hash of the value of the BIT STRING subjectPublicKey (excluding the tag, length, and number of unused bits).
- Parameters:
keyInfo- the key info object containing the subjectPublicKey field.- Returns:
- the key identifier.
-
createTruncatedSHA1KeyIdentifier
Deprecated.use org.bouncycastle.cert.X509ExtensionUtils.createTruncatedSubjectKeyIdentifierReturn a RFC 3280 type 2 key identifier. As in:(2) The keyIdentifier is composed of a four bit type field with the value 0100 followed by the least significant 60 bits of the SHA-1 hash of the value of the BIT STRING subjectPublicKey.
- Parameters:
keyInfo- the key info object containing the subjectPublicKey field.- Returns:
- the key identifier.
-