| Package | Description |
|---|---|
| org.cryptacular | |
| org.cryptacular.asn | |
| org.cryptacular.bean | |
| org.cryptacular.codec | |
| org.cryptacular.util | |
| org.cryptacular.x509 |
| Modifier and Type | Method and Description |
|---|---|
static CiphertextHeader |
CiphertextHeader.decode(byte[] data)
Creates a header from encrypted data containing a cleartext header prepended to the start.
|
static CiphertextHeader |
CiphertextHeader.decode(java.io.InputStream input)
Creates a header from encrypted data containing a cleartext header prepended to the start.
|
| Modifier and Type | Method and Description |
|---|---|
T |
ASN1Decoder.decode(byte[] encoded,
java.lang.Object... args)
Produces an object from an encoded representation.
|
T |
AbstractPrivateKeyDecoder.decode(byte[] encoded,
java.lang.Object... args) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
EncodingHashBean.compare(java.lang.String hash,
java.lang.Object... data)
Compares a known hash value with the hash of the given data.
|
byte[] |
AbstractCipherBean.decrypt(byte[] input) |
void |
AbstractCipherBean.decrypt(java.io.InputStream input,
java.io.OutputStream output) |
java.lang.String |
EncodingHashBean.hash(java.lang.Object... data)
Hashes the given data.
|
java.security.PrivateKey |
ResourceBasedPrivateKeyFactoryBean.newInstance() |
java.security.PublicKey |
PemBasedPublicKeyFactoryBean.newInstance() |
java.security.PublicKey |
ResourceBasedPublicKeyFactoryBean.newInstance() |
java.security.PrivateKey |
PemBasedPrivateKeyFactoryBean.newInstance() |
| Modifier and Type | Method and Description |
|---|---|
void |
HexDecoder.decode(java.nio.CharBuffer input,
java.nio.ByteBuffer output) |
void |
AbstractBaseNDecoder.decode(java.nio.CharBuffer input,
java.nio.ByteBuffer output) |
void |
Decoder.decode(java.nio.CharBuffer input,
java.nio.ByteBuffer output)
Decodes characters in input buffer into bytes placed in the output buffer.
|
void |
HexEncoder.encode(java.nio.ByteBuffer input,
java.nio.CharBuffer output) |
void |
Encoder.encode(java.nio.ByteBuffer input,
java.nio.CharBuffer output)
Encodes bytes in input buffer into characters placed in the output buffer.
|
void |
AbstractBaseNEncoder.encode(java.nio.ByteBuffer input,
java.nio.CharBuffer output) |
void |
HexDecoder.finalize(java.nio.ByteBuffer output) |
void |
AbstractBaseNDecoder.finalize(java.nio.ByteBuffer output) |
void |
Decoder.finalize(java.nio.ByteBuffer output)
Performs final output decoding (e.g.
|
void |
HexEncoder.finalize(java.nio.CharBuffer output) |
void |
Encoder.finalize(java.nio.CharBuffer output)
Performs final output encoding (e.g.
|
void |
AbstractBaseNEncoder.finalize(java.nio.CharBuffer output) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
CertUtil.allowsUsage(java.security.cert.X509Certificate cert,
org.bouncycastle.asn1.x509.KeyPurposeId... purposes)
Determines whether the certificate allows the given extended key usages.
|
static boolean |
CertUtil.allowsUsage(java.security.cert.X509Certificate cert,
KeyUsageBits... bits)
Determines whether the certificate allows the given basic key usages.
|
static java.lang.String |
CertUtil.authorityKeyId(java.security.cert.X509Certificate cert)
Gets the authority key identifier of the given certificate in delimited hexadecimal format, e.g.
|
static java.lang.String |
CodecUtil.b32(byte[] raw)
Encodes bytes into base 32-encoded string.
|
static java.lang.String |
CodecUtil.b32(byte[] raw,
int lineLength)
Encodes bytes into base32-encoded string.
|
static byte[] |
CodecUtil.b32(java.lang.CharSequence encoded)
Decodes a base32-encoded string into raw bytes.
|
static java.lang.String |
CodecUtil.b64(byte[] raw)
Encodes bytes into base 64-encoded string.
|
static java.lang.String |
CodecUtil.b64(byte[] raw,
int lineLength)
Encodes bytes into base64-encoded string.
|
static byte[] |
CodecUtil.b64(java.lang.CharSequence encoded)
Decodes a base64-encoded string into raw bytes.
|
static byte[] |
CodecUtil.decode(Decoder decoder,
java.lang.CharSequence encoded)
Decodes the given encoded data using the given char-to-byte decoder.
|
static java.security.cert.X509Certificate |
CertUtil.decodeCertificate(byte[] encoded)
Creates an X.509 certificate from its ASN.1 encoded form.
|
static java.security.cert.X509Certificate[] |
CertUtil.decodeCertificateChain(byte[] encoded)
Creates an X.509 certificate chain from its ASN.1 encoded form.
|
static java.security.PrivateKey |
KeyPairUtil.decodePrivateKey(byte[] encodedKey)
Decodes an encoded private key in either PKCS#8 or OpenSSL "traditional" format in either DER or PEM encoding.
|
static java.security.PrivateKey |
KeyPairUtil.decodePrivateKey(byte[] encryptedKey,
char[] password)
Decodes an encrypted private key.
|
static java.security.PublicKey |
KeyPairUtil.decodePublicKey(byte[] encoded)
Decodes public keys formatted in an X.509 SubjectPublicKeyInfo structure in either PEM or DER encoding.
|
static byte[] |
CipherUtil.decrypt(org.bouncycastle.crypto.modes.AEADBlockCipher cipher,
javax.crypto.SecretKey key,
byte[] data)
Decrypts data using an AEAD cipher.
|
static void |
CipherUtil.decrypt(org.bouncycastle.crypto.modes.AEADBlockCipher cipher,
javax.crypto.SecretKey key,
java.io.InputStream input,
java.io.OutputStream output)
Decrypts data using an AEAD cipher.
|
static byte[] |
CipherUtil.decrypt(org.bouncycastle.crypto.BlockCipher cipher,
javax.crypto.SecretKey key,
byte[] data)
Decrypts data using the given block cipher with PKCS5 padding.
|
static void |
CipherUtil.decrypt(org.bouncycastle.crypto.BlockCipher cipher,
javax.crypto.SecretKey key,
java.io.InputStream input,
java.io.OutputStream output)
Decrypts data using the given block cipher with PKCS5 padding.
|
static java.lang.String |
CodecUtil.encode(Encoder encoder,
byte[] raw)
Encodes raw bytes using the given encoder.
|
static java.security.cert.X509Certificate |
CertUtil.findEntityCertificate(java.security.PrivateKey key,
java.util.Collection<java.security.cert.X509Certificate> candidates)
Finds a certificate whose public key is paired with the given private key.
|
static java.security.cert.X509Certificate |
CertUtil.findEntityCertificate(java.security.PrivateKey key,
java.security.cert.X509Certificate... candidates)
Finds a certificate whose public key is paired with the given private key.
|
static boolean |
CertUtil.hasPolicies(java.security.cert.X509Certificate cert,
java.lang.String... policyOidsToCheck)
Determines whether the certificate defines all of the given certificate policies.
|
static java.lang.String |
CodecUtil.hex(byte[] raw)
Encodes raw bytes to the equivalent hexadecimal encoded string.
|
static java.lang.String |
CodecUtil.hex(byte[] raw,
boolean delimit)
Encodes raw bytes to the equivalent hexadecimal encoded string with optional delimiting of output.
|
static byte[] |
CodecUtil.hex(java.lang.CharSequence encoded)
Decodes a hexadecimal encoded string to raw bytes.
|
static java.security.cert.X509Certificate |
CertUtil.readCertificate(java.io.File file)
Reads an X.509 certificate from ASN.1 encoded format from the given file.
|
static java.security.cert.X509Certificate |
CertUtil.readCertificate(java.io.InputStream in)
Reads an X.509 certificate from ASN.1 encoded data in the given stream.
|
static java.security.cert.X509Certificate |
CertUtil.readCertificate(java.lang.String path)
Reads an X.509 certificate from ASN.1 encoded format in the file at the given location.
|
static java.security.cert.X509Certificate[] |
CertUtil.readCertificateChain(java.io.File file)
Reads an X.509 certificate chain from ASN.1 encoded format from the given file.
|
static java.security.cert.X509Certificate[] |
CertUtil.readCertificateChain(java.io.InputStream in)
Reads an X.509 certificate chain from ASN.1 encoded data in the given stream.
|
static java.security.cert.X509Certificate[] |
CertUtil.readCertificateChain(java.lang.String path)
Reads an X.509 certificate chain from ASN.1 encoded format in the file at the given location.
|
static java.security.PrivateKey |
KeyPairUtil.readPrivateKey(java.io.File file)
Reads an encoded private key from a file.
|
static java.security.PrivateKey |
KeyPairUtil.readPrivateKey(java.io.File file,
char[] password)
Reads an encrypted private key from a file.
|
static java.security.PrivateKey |
KeyPairUtil.readPrivateKey(java.io.InputStream in)
Reads an encoded private key from an input stream.
|
static java.security.PrivateKey |
KeyPairUtil.readPrivateKey(java.io.InputStream in,
char[] password)
Reads an encrypted private key from an input stream.
|
static java.security.PrivateKey |
KeyPairUtil.readPrivateKey(java.lang.String path)
Reads an encoded private key from a file at the given path.
|
static java.security.PrivateKey |
KeyPairUtil.readPrivateKey(java.lang.String path,
char[] password)
Reads an encrypted private key from a file at the given path.
|
static java.security.PublicKey |
KeyPairUtil.readPublicKey(java.io.File file)
Reads a DER or PEM-encoded public key from a file.
|
static java.security.PublicKey |
KeyPairUtil.readPublicKey(java.io.InputStream in)
Reads a DER or PEM-encoded public key from data in the given stream.
|
static java.security.PublicKey |
KeyPairUtil.readPublicKey(java.lang.String path)
Reads a DER or PEM-encoded public key from a file.
|
static org.bouncycastle.asn1.x509.GeneralNames |
CertUtil.subjectAltNames(java.security.cert.X509Certificate cert)
Gets all subject alternative names defined on the given certificate.
|
static org.bouncycastle.asn1.x509.GeneralNames |
CertUtil.subjectAltNames(java.security.cert.X509Certificate cert,
GeneralNameType... types)
Gets all subject alternative names of the given type(s) on the given cert.
|
static java.lang.String |
CertUtil.subjectCN(java.security.cert.X509Certificate cert)
Gets the common name attribute (CN) of the certificate subject distinguished name.
|
static java.lang.String |
CertUtil.subjectKeyId(java.security.cert.X509Certificate cert)
Gets the subject key identifier of the given certificate in delimited hexadecimal format, e.g.
|
static java.util.List<java.lang.String> |
CertUtil.subjectNames(java.security.cert.X509Certificate cert)
Gets a list of all subject names defined for the given certificate.
|
static java.util.List<java.lang.String> |
CertUtil.subjectNames(java.security.cert.X509Certificate cert,
GeneralNameType... types)
Gets a list of subject names defined for the given certificate.
|
| Modifier and Type | Method and Description |
|---|---|
org.bouncycastle.asn1.ASN1Encodable |
ExtensionReader.read(java.lang.String extensionOidOrName)
Reads the value of the extension given by OID or name as defined in section 4.2 of RFC 2459.
|
java.util.List<org.bouncycastle.asn1.x509.AccessDescription> |
ExtensionReader.readAuthorityInformationAccess()
Reads the value of the
AuthorityInformationAccess extension field of the certificate. |
org.bouncycastle.asn1.x509.AuthorityKeyIdentifier |
ExtensionReader.readAuthorityKeyIdentifier()
Reads the value of the
AuthorityKeyIdentifier extension field of the certificate. |
org.bouncycastle.asn1.x509.BasicConstraints |
ExtensionReader.readBasicConstraints()
Reads the value of the
BasicConstraints extension field of the certificate. |
java.util.List<org.bouncycastle.asn1.x509.PolicyInformation> |
ExtensionReader.readCertificatePolicies()
Reads the value of the
CertificatePolicies extension field of the certificate. |
java.util.List<org.bouncycastle.asn1.x509.DistributionPoint> |
ExtensionReader.readCRLDistributionPoints()
Reads the value of the
CRLDistributionPoints extension field of the certificate. |
java.util.List<org.bouncycastle.asn1.x509.KeyPurposeId> |
ExtensionReader.readExtendedKeyUsage()
Reads the value of the
ExtendedKeyUsage extension field of the certificate. |
org.bouncycastle.asn1.x509.GeneralNames |
ExtensionReader.readIssuerAlternativeName()
Reads the value of the
IssuerAlternativeName extension field of the certificate. |
org.bouncycastle.asn1.x509.KeyUsage |
ExtensionReader.readKeyUsage()
Reads the value of the
KeyUsage extension field of the certificate. |
org.bouncycastle.asn1.x509.GeneralNames |
ExtensionReader.readSubjectAlternativeName()
Reads the value of the SubjectAlternativeName extension field of the certificate.
|
org.bouncycastle.asn1.x509.SubjectKeyIdentifier |
ExtensionReader.readSubjectKeyIdentifier()
Reads the value of the
SubjectKeyIdentifier extension field of the certificate. |