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