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)
Deprecated.
Creates a header from encrypted data containing a cleartext header prepended to the start.
|
static CiphertextHeaderV2 |
CiphertextHeaderV2.decode(byte[] data,
Function<String,SecretKey> keyLookup)
Creates a header from encrypted data containing a cleartext header prepended to the start.
|
static CiphertextHeader |
CiphertextHeader.decode(InputStream input)
Deprecated.
Creates a header from encrypted data containing a cleartext header prepended to the start.
|
static CiphertextHeaderV2 |
CiphertextHeaderV2.decode(InputStream input,
Function<String,SecretKey> keyLookup)
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,
Object... args)
Produces an object from an encoded representation.
|
T |
AbstractPrivateKeyDecoder.decode(byte[] encoded,
Object... args) |
Modifier and Type | Method and Description |
---|---|
boolean |
EncodingHashBean.compare(String hash,
Object... data)
Compares a known hash value with the hash of the given data.
|
byte[] |
AbstractCipherBean.decrypt(byte[] input) |
void |
AbstractCipherBean.decrypt(InputStream input,
OutputStream output) |
String |
EncodingHashBean.hash(Object... data)
Hashes the given data.
|
PrivateKey |
PemBasedPrivateKeyFactoryBean.newInstance() |
PrivateKey |
ResourceBasedPrivateKeyFactoryBean.newInstance() |
PublicKey |
ResourceBasedPublicKeyFactoryBean.newInstance() |
PublicKey |
PemBasedPublicKeyFactoryBean.newInstance() |
Modifier and Type | Method and Description |
---|---|
void |
AbstractBaseNDecoder.decode(CharBuffer input,
ByteBuffer output) |
void |
HexDecoder.decode(CharBuffer input,
ByteBuffer output) |
void |
Decoder.decode(CharBuffer input,
ByteBuffer output)
Decodes characters in input buffer into bytes placed in the output buffer.
|
void |
Encoder.encode(ByteBuffer input,
CharBuffer output)
Encodes bytes in input buffer into characters placed in the output buffer.
|
void |
HexEncoder.encode(ByteBuffer input,
CharBuffer output) |
void |
AbstractBaseNEncoder.encode(ByteBuffer input,
CharBuffer output) |
void |
AbstractBaseNDecoder.finalize(ByteBuffer output) |
void |
HexDecoder.finalize(ByteBuffer output) |
void |
Decoder.finalize(ByteBuffer output)
Performs final output decoding (e.g. padding) after all input characters have been provided.
|
void |
Encoder.finalize(CharBuffer output)
Performs final output encoding (e.g. padding) after all input bytes have been provided.
|
void |
HexEncoder.finalize(CharBuffer output) |
void |
AbstractBaseNEncoder.finalize(CharBuffer output) |
Modifier and Type | Method and Description |
---|---|
static boolean |
CertUtil.allowsUsage(X509Certificate cert,
org.bouncycastle.asn1.x509.KeyPurposeId... purposes)
Determines whether the certificate allows the given extended key usages.
|
static boolean |
CertUtil.allowsUsage(X509Certificate cert,
KeyUsageBits... bits)
Determines whether the certificate allows the given basic key usages.
|
static String |
CertUtil.authorityKeyId(X509Certificate cert)
Gets the authority key identifier of the given certificate in delimited hexadecimal format, e.g.
|
static String |
CodecUtil.b32(byte[] raw)
Encodes bytes into base 32-encoded string.
|
static String |
CodecUtil.b32(byte[] raw,
int lineLength)
Encodes bytes into base32-encoded string.
|
static byte[] |
CodecUtil.b32(CharSequence encoded)
Decodes a base32-encoded string into raw bytes.
|
static String |
CodecUtil.b64(byte[] raw)
Encodes bytes into base 64-encoded string.
|
static String |
CodecUtil.b64(byte[] raw,
int lineLength)
Encodes bytes into base64-encoded string.
|
static byte[] |
CodecUtil.b64(CharSequence encoded)
Decodes a base64-encoded string into raw bytes.
|
static byte[] |
CodecUtil.decode(Decoder decoder,
CharSequence encoded)
Decodes the given encoded data using the given char-to-byte decoder.
|
static X509Certificate |
CertUtil.decodeCertificate(byte[] encoded)
Creates an X.509 certificate from its ASN.1 encoded form.
|
static X509Certificate[] |
CertUtil.decodeCertificateChain(byte[] encoded)
Creates an X.509 certificate chain from its ASN.1 encoded form.
|
static 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 PrivateKey |
KeyPairUtil.decodePrivateKey(byte[] encryptedKey,
char[] password)
Decodes an encrypted private key.
|
static 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,
SecretKey key,
byte[] data)
Decrypts data using an AEAD cipher.
|
static void |
CipherUtil.decrypt(org.bouncycastle.crypto.modes.AEADBlockCipher cipher,
SecretKey key,
InputStream input,
OutputStream output)
Decrypts data using an AEAD cipher.
|
static byte[] |
CipherUtil.decrypt(org.bouncycastle.crypto.BlockCipher cipher,
SecretKey key,
byte[] data)
Decrypts data using the given block cipher with PKCS5 padding.
|
static void |
CipherUtil.decrypt(org.bouncycastle.crypto.BlockCipher cipher,
SecretKey key,
InputStream input,
OutputStream output)
Decrypts data using the given block cipher with PKCS5 padding.
|
static String |
CodecUtil.encode(Encoder encoder,
byte[] raw)
Encodes raw bytes using the given encoder.
|
static X509Certificate |
CertUtil.findEntityCertificate(PrivateKey key,
Collection<X509Certificate> candidates)
Finds a certificate whose public key is paired with the given private key.
|
static X509Certificate |
CertUtil.findEntityCertificate(PrivateKey key,
X509Certificate... candidates)
Finds a certificate whose public key is paired with the given private key.
|
static boolean |
CertUtil.hasPolicies(X509Certificate cert,
String... policyOidsToCheck)
Determines whether the certificate defines all the given certificate policies.
|
static String |
CodecUtil.hex(byte[] raw)
Encodes raw bytes to the equivalent hexadecimal encoded string.
|
static 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(CharSequence encoded)
Decodes a hexadecimal encoded string to raw bytes.
|
static X509Certificate |
CertUtil.readCertificate(File file)
Reads an X.509 certificate from ASN.1 encoded format from the given file.
|
static X509Certificate |
CertUtil.readCertificate(InputStream in)
Reads an X.509 certificate from ASN.1 encoded data in the given stream.
|
static X509Certificate |
CertUtil.readCertificate(String path)
Reads an X.509 certificate from ASN.1 encoded format in the file at the given location.
|
static X509Certificate[] |
CertUtil.readCertificateChain(File file)
Reads an X.509 certificate chain from ASN.1 encoded format from the given file.
|
static X509Certificate[] |
CertUtil.readCertificateChain(InputStream in)
Reads an X.509 certificate chain from ASN.1 encoded data in the given stream.
|
static X509Certificate[] |
CertUtil.readCertificateChain(String path)
Reads an X.509 certificate chain from ASN.1 encoded format in the file at the given location.
|
static PrivateKey |
KeyPairUtil.readPrivateKey(File file)
Reads an encoded private key from a file.
|
static PrivateKey |
KeyPairUtil.readPrivateKey(File file,
char[] password)
Reads an encrypted private key from a file.
|
static PrivateKey |
KeyPairUtil.readPrivateKey(InputStream in)
Reads an encoded private key from an input stream.
|
static PrivateKey |
KeyPairUtil.readPrivateKey(InputStream in,
char[] password)
Reads an encrypted private key from an input stream.
|
static PrivateKey |
KeyPairUtil.readPrivateKey(String path)
Reads an encoded private key from a file at the given path.
|
static PrivateKey |
KeyPairUtil.readPrivateKey(String path,
char[] password)
Reads an encrypted private key from a file at the given path.
|
static PublicKey |
KeyPairUtil.readPublicKey(File file)
Reads a DER or PEM-encoded public key from a file.
|
static PublicKey |
KeyPairUtil.readPublicKey(InputStream in)
Reads a DER or PEM-encoded public key from data in the given stream.
|
static PublicKey |
KeyPairUtil.readPublicKey(String path)
Reads a DER or PEM-encoded public key from a file.
|
static org.bouncycastle.asn1.x509.GeneralNames |
CertUtil.subjectAltNames(X509Certificate cert)
Gets all subject alternative names defined on the given certificate.
|
static org.bouncycastle.asn1.x509.GeneralNames |
CertUtil.subjectAltNames(X509Certificate cert,
GeneralNameType... types)
Gets all subject alternative names of the given type(s) on the given cert.
|
static String |
CertUtil.subjectCN(X509Certificate cert)
Gets the common name attribute (CN) of the certificate subject distinguished name.
|
static String |
CertUtil.subjectKeyId(X509Certificate cert)
Gets the subject key identifier of the given certificate in delimited hexadecimal format, e.g.
|
static List<String> |
CertUtil.subjectNames(X509Certificate cert)
Gets a list of all subject names defined for the given certificate.
|
static List<String> |
CertUtil.subjectNames(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(String extensionOidOrName)
Reads the value of the extension given by OID or name as defined in section 4.2 of RFC 2459.
|
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. |
List<org.bouncycastle.asn1.x509.PolicyInformation> |
ExtensionReader.readCertificatePolicies()
Reads the value of the
CertificatePolicies extension field of the certificate. |
List<org.bouncycastle.asn1.x509.DistributionPoint> |
ExtensionReader.readCRLDistributionPoints()
Reads the value of the
CRLDistributionPoints extension field of the certificate. |
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. |
Copyright © 2003-2024 Virginia Tech. All Rights Reserved.