Top Description Constructors Methods
org.bouncycastle.gpg.keybox

public Class CertificateBlob

extends KeyBlob
Class Inheritance
Imports
java.io.IOException, java.util.ArrayList, .List

A PGP blob holds key material.

Constructor Summary

AccessConstructor and Description
private
CertificateBlob(int base, long length, BlobType type, int version, int blobFlags, int keyNumber, List<KeyInformation> keyInformation, byte[] serialNumber, int numberOfUserIDs, List<UserID> userIds, int numberOfSignatures, List<Long> expirationTime, int assignedOwnerTrust, int allValidity, long recheckAfter, long newestTimestamp, long blobCreatedAt, byte[] keyBytes, byte[] reserveBytes, byte[] sha1Checksum)

Method Summary

Modifier and TypeMethod and Description
public byte[]
getEncodedCertificate()

Return the encoded certificate.

pack-priv static Blob
parseContent(int base, long length, BlobType type, int version, KeyBoxByteBuffer buffer, BlobVerifier blobVerifier)

Inherited from org.bouncycastle.gpg.keybox.KeyBlob:
getAllValiditygetAssignedOwnerTrustgetBlobCreatedAtgetBlobFlagsgetChecksumgetExpirationTimegetKeyBytesgetKeyInformationgetKeyNumbergetNewestTimestampgetNumberOfSignaturesgetNumberOfUserIDsgetRecheckAftergetReserveBytesgetSerialNumbergetUserIdsverifyDigest

Constructor Detail

CertificateBlobback to summary
private CertificateBlob(int base, long length, BlobType type, int version, int blobFlags, int keyNumber, List<KeyInformation> keyInformation, byte[] serialNumber, int numberOfUserIDs, List<UserID> userIds, int numberOfSignatures, List<Long> expirationTime, int assignedOwnerTrust, int allValidity, long recheckAfter, long newestTimestamp, long blobCreatedAt, byte[] keyBytes, byte[] reserveBytes, byte[] sha1Checksum)

Method Detail

getEncodedCertificateback to summary
public byte[] getEncodedCertificate()

Return the encoded certificate.

This is the raw certificate data, if you are using the JCA then you can convert it back to an X509 Certificate using.

Example: byte[] certData = keyBlob.getEncodedCertificate(); CertificateFactory factory = CertificateFactory.getInstance("X509"); certificate = factory.generateCertificate(new ByteArrayInputStream(certData));

parseContentback to summary
pack-priv static Blob parseContent(int base, long length, BlobType type, int version, KeyBoxByteBuffer buffer, BlobVerifier blobVerifier) throws IOException