Top Inners Constructors Methods
org.bouncycastle.cert.bc

public Class BcX509ExtensionUtils

extends X509ExtensionUtils
Class Inheritance
Imports
java.io.ByteArrayOutputStream, .IOException, .OutputStream, org.bouncycastle.asn1.oiw.OIWObjectIdentifiers, org.bouncycastle.asn1.x509.AlgorithmIdentifier, .AuthorityKeyIdentifier, .SubjectKeyIdentifier, org.bouncycastle.cert.X509ExtensionUtils, org.bouncycastle.crypto.Digest, org.bouncycastle.crypto.digests.SHA1Digest, org.bouncycastle.crypto.params.AsymmetricKeyParameter, org.bouncycastle.crypto.util.SubjectPublicKeyInfoFactory, org.bouncycastle.operator.DigestCalculator

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
public
BcX509ExtensionUtils()

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

public

Method Summary

Modifier and TypeMethod and Description
public AuthorityKeyIdentifier
public SubjectKeyIdentifier

Returns:

the key identifier.
createSubjectKeyIdentifier
(AsymmetricKeyParameter
the key object containing the key identifier is to be based on.
publicKey
)

Return a RFC 3280 type 1 key identifier.

Inherited from org.bouncycastle.cert.X509ExtensionUtils:
createAuthorityKeyIdentifiercreateAuthorityKeyIdentifiercreateAuthorityKeyIdentifiercreateSubjectKeyIdentifiercreateTruncatedSubjectKeyIdentifier

Constructor Detail

BcX509ExtensionUtilsback to summary
public BcX509ExtensionUtils()

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

BcX509ExtensionUtilsback to summary
public BcX509ExtensionUtils(DigestCalculator calculator)

Method Detail

createAuthorityKeyIdentifierback to summary
public AuthorityKeyIdentifier createAuthorityKeyIdentifier(AsymmetricKeyParameter publicKey) throws IOException
createSubjectKeyIdentifierback to summary
public SubjectKeyIdentifier createSubjectKeyIdentifier(AsymmetricKeyParameter publicKey) throws 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:AsymmetricKeyParameter

the key object containing the key identifier is to be based on.

Returns:SubjectKeyIdentifier

the key identifier.

org.bouncycastle.cert.bc back to summary

private Class BcX509ExtensionUtils.SHA1DigestCalculator

extends Object
implements DigestCalculator
Class Inheritance
  • java.lang.Object
  • org.bouncycastle.cert.bc.BcX509ExtensionUtils.SHA1DigestCalculator
All Implemented Interfaces
org.bouncycastle.operator.DigestCalculator

Field Summary

Modifier and TypeField and Description
private ByteArrayOutputStream

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public AlgorithmIdentifier
getAlgorithmIdentifier()

Implements org.bouncycastle.operator.DigestCalculator.getAlgorithmIdentifier.

Return the algorithm identifier representing the digest implemented by this calculator.
public byte[]
getDigest()

Implements org.bouncycastle.operator.DigestCalculator.getDigest.

Return the digest calculated on what has been written to the calculator's output stream.
public OutputStream
getOutputStream()

Implements org.bouncycastle.operator.DigestCalculator.getOutputStream.

Returns a stream that will accept data for the purpose of calculating a digest.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bOutback to summary
private ByteArrayOutputStream bOut

Constructor Detail

SHA1DigestCalculatorback to summary
private SHA1DigestCalculator()

Method Detail

getAlgorithmIdentifierback to summary
public AlgorithmIdentifier getAlgorithmIdentifier()

Implements org.bouncycastle.operator.DigestCalculator.getAlgorithmIdentifier.

Doc from org.bouncycastle.operator.DigestCalculator.getAlgorithmIdentifier.

Return the algorithm identifier representing the digest implemented by this calculator.

Returns:AlgorithmIdentifier

algorithm id and parameters.

getDigestback to summary
public byte[] getDigest()

Implements org.bouncycastle.operator.DigestCalculator.getDigest.

Doc from org.bouncycastle.operator.DigestCalculator.getDigest.

Return the digest calculated on what has been written to the calculator's output stream.

Returns:byte[]

a digest.

getOutputStreamback to summary
public OutputStream getOutputStream()

Implements org.bouncycastle.operator.DigestCalculator.getOutputStream.

Doc from org.bouncycastle.operator.DigestCalculator.getOutputStream.

Returns a stream that will accept data for the purpose of calculating a digest. Use org.bouncycastle.util.io.TeeOutputStream if you want to accumulate the data on the fly as well.

Returns:OutputStream

an OutputStream