BcX509ExtensionUtils (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.cert.bc

## Class BcX509ExtensionUtils

- java.lang.Object
- - org.bouncycastle.cert.X509ExtensionUtils
  - - org.bouncycastle.cert.bc.BcX509ExtensionUtils

-     public class BcX509ExtensionUtils
      extends X509ExtensionUtils

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BcX509ExtensionUtils()` Create a utility class pre-configured with a SHA-1 digest calculator based on the BC implementation.
    `BcX509ExtensionUtils(DigestCalculator calculator)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.bouncycastle.asn1.x509.AuthorityKeyIdentifier` | `createAuthorityKeyIdentifier(org.bouncycastle.crypto.params.AsymmetricKeyParameter publicKey)`
    `org.bouncycastle.asn1.x509.SubjectKeyIdentifier` | `createSubjectKeyIdentifier(org.bouncycastle.crypto.params.AsymmetricKeyParameter publicKey)` Return a RFC 3280 type 1 key identifier.

    - ### Methods inherited from class org.bouncycastle.cert.X509ExtensionUtils

      `createAuthorityKeyIdentifier, createAuthorityKeyIdentifier, createAuthorityKeyIdentifier, createSubjectKeyIdentifier, createTruncatedSubjectKeyIdentifier`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BcX509ExtensionUtils

          public BcX509ExtensionUtils()

      Create a utility class pre-configured with a SHA-1 digest calculator based on the BC implementation.

    - #### BcX509ExtensionUtils

          public BcX509ExtensionUtils(DigestCalculator calculator)

  - ### Method Detail

    - #### createAuthorityKeyIdentifier

          public org.bouncycastle.asn1.x509.AuthorityKeyIdentifier createAuthorityKeyIdentifier(org.bouncycastle.crypto.params.AsymmetricKeyParameter publicKey)
                                                                                         throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### createSubjectKeyIdentifier

          public org.bouncycastle.asn1.x509.SubjectKeyIdentifier createSubjectKeyIdentifier(org.bouncycastle.crypto.params.AsymmetricKeyParameter publicKey)
                                                                                     throws java.io.IOException

      Return 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:
        `publicKey` - the key object containing the key identifier is to be based on.
      Returns:
        the key identifier.
      Throws:
        `java.io.IOException`