public class Aes extends Object implements CipherAlgorithm, KeyDerivationFunction
The class is a singleton
| Modifier and Type | Class and Description |
|---|---|
static class |
Aes.KdfKeys
v4 variant dictionary keys for use of AES as the KDF
|
| Modifier and Type | Method and Description |
|---|---|
VariantDictionary |
createKdfParameters()
get a copy of the Aes Variant dictionary
|
UUID |
getCipherUuid()
Returns the UUID of this algorithm
|
InputStream |
getDecryptedInputStream(InputStream encryptedInputStream,
byte[] key,
byte[] iv)
Create a decrypted stream from the supplied encrypted one
|
OutputStream |
getEncryptedOutputStream(OutputStream decryptedOutputStream,
byte[] key,
byte[] iv)
Create an encrypted stream from the supplied unencrypted one
|
static Aes |
getInstance() |
UUID |
getKdfUuid()
The UUID of this key derivation function
|
String |
getName()
Return the name of this algorithm
|
static byte[] |
getTransformedKey(byte[] key,
byte[] transformSeed,
long transformRounds)
Simplified version for KDBX V3
|
byte[] |
getTransformedKey(byte[] key,
VariantDictionary transformParams)
Transform a key using this key derivation function
|
public static Aes getInstance()
public VariantDictionary createKdfParameters()
createKdfParameters in interface KeyDerivationFunctionpublic UUID getCipherUuid()
CipherAlgorithmgetCipherUuid in interface CipherAlgorithmpublic String getName()
CipherAlgorithmgetName in interface CipherAlgorithmgetName in interface KeyDerivationFunctionpublic InputStream getDecryptedInputStream(InputStream encryptedInputStream, byte[] key, byte[] iv)
CipherAlgorithmgetDecryptedInputStream in interface CipherAlgorithmencryptedInputStream - an encrypted streamkey - the decryption keyiv - the ivpublic OutputStream getEncryptedOutputStream(OutputStream decryptedOutputStream, byte[] key, byte[] iv)
CipherAlgorithmgetEncryptedOutputStream in interface CipherAlgorithmdecryptedOutputStream - an unencrypted streamkey - a keyiv - an ivpublic UUID getKdfUuid()
KeyDerivationFunctiongetKdfUuid in interface KeyDerivationFunctionpublic byte[] getTransformedKey(byte[] key,
VariantDictionary transformParams)
KeyDerivationFunctiongetTransformedKey in interface KeyDerivationFunctionkey - the key to transformtransformParams - the parameters defining the way the transformation is to be carried outpublic static byte[] getTransformedKey(byte[] key,
byte[] transformSeed,
long transformRounds)
key - the composite keytransformSeed - the seedtransformRounds - number of roundsCopyright © 2025. All rights reserved.