| Package | Description |
|---|---|
| org.cryptacular | |
| org.cryptacular.bean | |
| org.cryptacular.util |
| Modifier and Type | Method and Description |
|---|---|
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 |
|---|---|
boolean |
SimpleHashBean.compare(byte[] hash,
java.lang.Object... data)
Compares a known hash value with the hash of the given data.
|
boolean |
EncodingHashBean.compare(java.lang.String hash,
java.lang.Object... data)
Compares a known hash value with the hash of the given data.
|
boolean |
HashBean.compare(T hash,
java.lang.Object... data)
Compares a known hash value with the hash of the given data.
|
void |
CipherBean.decrypt(java.io.InputStream input,
java.io.OutputStream output)
Decrypts the data from the input stream onto the output stream using a symmetric cipher.
|
void |
AbstractCipherBean.decrypt(java.io.InputStream input,
java.io.OutputStream output) |
void |
CipherBean.encrypt(java.io.InputStream input,
java.io.OutputStream output)
Encrypts the data from the input stream onto the output stream using a symmetric cipher.
|
void |
AbstractCipherBean.encrypt(java.io.InputStream input,
java.io.OutputStream output) |
byte[] |
SimpleHashBean.hash(java.lang.Object... data) |
java.lang.String |
EncodingHashBean.hash(java.lang.Object... data)
Hashes the given data.
|
T |
HashBean.hash(java.lang.Object... data)
Hashes the given data.
|
java.security.PrivateKey |
ResourceBasedPrivateKeyFactoryBean.newInstance() |
javax.crypto.SecretKey |
ResourceBasedSecretKeyFactoryBean.newInstance() |
java.security.PublicKey |
ResourceBasedPublicKeyFactoryBean.newInstance() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
HashUtil.compareHash(org.bouncycastle.crypto.Digest digest,
byte[] hash,
int iterations,
java.lang.Object... data)
Determines whether the hash of the given input equals a known value.
|
static boolean |
HashUtil.compareHash(org.bouncycastle.crypto.Digest digest,
SaltedHash hash,
int iterations,
boolean saltAfterData,
java.lang.Object... data)
Determines whether the salted hash of the given input equals a known hash value.
|
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 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 void |
CipherUtil.encrypt(org.bouncycastle.crypto.modes.AEADBlockCipher cipher,
javax.crypto.SecretKey key,
Nonce nonce,
java.io.InputStream input,
java.io.OutputStream output)
Encrypts data using an AEAD cipher.
|
static void |
CipherUtil.encrypt(org.bouncycastle.crypto.BlockCipher cipher,
javax.crypto.SecretKey key,
Nonce nonce,
java.io.InputStream input,
java.io.OutputStream output)
Encrypts data using the given block cipher with PKCS5 padding.
|
static byte[] |
HashUtil.hash(org.bouncycastle.crypto.Digest digest,
int iterations,
java.lang.Object... data)
Computes the iterated hash of the given data using the given algorithm.
|
static byte[] |
HashUtil.hash(org.bouncycastle.crypto.Digest digest,
java.lang.Object... data)
Computes the hash of the given data using the given algorithm.
|
static java.io.Reader |
StreamUtil.makeReader(java.io.File file)
Creates a reader around the given file that presumably contains character data.
|
static java.io.InputStream |
StreamUtil.makeStream(java.io.File file)
Creates an input stream around the given file.
|
static void |
StreamUtil.pipeAll(java.io.InputStream in,
java.io.OutputStream out,
ChunkHandler handler)
Pipes an input stream into an output stream with chuncked processing.
|
static byte[] |
StreamUtil.readAll(java.io.File file)
Reads all the data from the given file.
|
static byte[] |
StreamUtil.readAll(java.io.InputStream input)
Reads all the data from the given input stream.
|
static byte[] |
StreamUtil.readAll(java.io.InputStream input,
int sizeHint)
Reads all the data from the given input stream.
|
static java.lang.String |
StreamUtil.readAll(java.io.Reader reader)
Reads all data from the given reader.
|
static java.lang.String |
StreamUtil.readAll(java.io.Reader reader,
int sizeHint)
Reads all data from the given reader.
|
static byte[] |
StreamUtil.readAll(java.lang.String path)
Reads all the data from the file at the given path.
|
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 int |
ByteUtil.readInt(java.io.InputStream in)
Reads 4-bytes from the input stream and converts to a 32-bit integer.
|
static long |
ByteUtil.readLong(java.io.InputStream in)
Reads 8-bytes from the input stream and converts to a 64-bit long integer.
|
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.
|