public class BcX509ExtensionUtils extends X509ExtensionUtils
| Constructor and Description |
|---|
BcX509ExtensionUtils()
Create a utility class pre-configured with a SHA-1 digest calculator based on the
BC implementation.
|
BcX509ExtensionUtils(org.bouncycastle.operator.DigestCalculator calculator) |
| Modifier and Type | Method and Description |
|---|---|
AuthorityKeyIdentifier |
createAuthorityKeyIdentifier(AsymmetricKeyParameter publicKey)
Create an AuthorityKeyIdentifier from the passed in SubjectPublicKeyInfo.
|
SubjectKeyIdentifier |
createSubjectKeyIdentifier(AsymmetricKeyParameter publicKey)
Return a RFC 3280 type 1 key identifier.
|
createAuthorityKeyIdentifier, createTruncatedSubjectKeyIdentifierpublic BcX509ExtensionUtils()
public BcX509ExtensionUtils(org.bouncycastle.operator.DigestCalculator calculator)
public AuthorityKeyIdentifier createAuthorityKeyIdentifier(AsymmetricKeyParameter publicKey)
throws java.io.IOException
X509ExtensionUtilscreateAuthorityKeyIdentifier in class X509ExtensionUtilspublicKey - the SubjectPublicKeyInfo to base the key identifier on.java.io.IOExceptionpublic SubjectKeyIdentifier createSubjectKeyIdentifier(AsymmetricKeyParameter publicKey)
throws java.io.IOException
(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).
createSubjectKeyIdentifier in class X509ExtensionUtilspublicKey - the key object containing the key identifier is to be based on.java.io.IOException