Module io.github.mmm.crypto
Class SymmetricCryptorConfigAes
- java.lang.Object
-
- io.github.mmm.crypto.CryptoConfig
-
- io.github.mmm.crypto.algorithm.CryptoAlgorithmConfig
-
- io.github.mmm.crypto.crypt.CryptorConfig
-
- io.github.mmm.crypto.symmetric.crypt.SymmetricCryptorConfig
-
- io.github.mmm.crypto.symmetric.crypt.aes.SymmetricCryptorConfigAes
-
- All Implemented Interfaces:
CryptoAlgorithm
,AbstractGetNonceSize
public class SymmetricCryptorConfigAes extends SymmetricCryptorConfig
SecurityCryptorAlgorithmSymmetricConfig for AES.
Attention: JCA/JCE is buggy (creates a nonce of 12 on encryption but expects 16 bytes nonce on decryption, etc.). Therefore you shall only use this withBouncyCastle
.- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static String
ALGORITHM_AES
Cipher algorithm
"AES".static CipherTransformation
TRANSFORMATION_AES_GCM_NOPADDING
-
Fields inherited from class io.github.mmm.crypto.algorithm.CryptoAlgorithmConfig
algorithm
-
Fields inherited from class io.github.mmm.crypto.CryptoConfig
provider
-
-
Constructor Summary
Constructors Constructor Description SymmetricCryptorConfigAes(SecurityProvider provider)
The constructor.SymmetricCryptorConfigAes(SecurityProvider provider, int nonceSize)
The constructor.SymmetricCryptorConfigAes(String mode, String padding, SecurityProvider provider, int nonceSize)
The constructor.
-
Method Summary
-
Methods inherited from class io.github.mmm.crypto.crypt.CryptorConfig
getNonceSize, getTransformation, isCreateRandomNonce
-
Methods inherited from class io.github.mmm.crypto.algorithm.CryptoAlgorithmConfig
getAlgorithm
-
Methods inherited from class io.github.mmm.crypto.CryptoConfig
getProvider
-
-
-
-
Field Detail
-
ALGORITHM_AES
public static final String ALGORITHM_AES
Cipher algorithm
"AES".- See Also:
- Constant Field Values
-
TRANSFORMATION_AES_GCM_NOPADDING
public static final CipherTransformation TRANSFORMATION_AES_GCM_NOPADDING
-
-
Constructor Detail
-
SymmetricCryptorConfigAes
public SymmetricCryptorConfigAes(String mode, String padding, SecurityProvider provider, int nonceSize)
The constructor.- Parameters:
mode
- thecipher mode
.padding
- thecipher padding
.provider
- theSecurityProvider
.nonceSize
- thenonce-size
.
-
SymmetricCryptorConfigAes
public SymmetricCryptorConfigAes(SecurityProvider provider)
The constructor.- Parameters:
provider
- theSecurityProvider
.
-
SymmetricCryptorConfigAes
public SymmetricCryptorConfigAes(SecurityProvider provider, int nonceSize)
The constructor.- Parameters:
provider
- theSecurityProvider
.nonceSize
- thenonce-size
.
-
-