public class CryptorConfig extends CryptoAlgorithmConfig implements AbstractGetNonceSize
| Modifier and Type | Field and Description |
|---|---|
private int |
nonceSize |
private CipherTransformation |
transformation |
algorithmprovider| Constructor and Description |
|---|
CryptorConfig(CipherTransformation transformation,
SecurityProvider provider,
int nonceSize)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getNonceSize()
Unlike
Cipher this API is designed for ease of use. |
CipherTransformation |
getTransformation() |
boolean |
isCreateRandomNonce()
This method returns
false by default. |
getAlgorithmgetProviderprivate final CipherTransformation transformation
private final int nonceSize
public CryptorConfig(CipherTransformation transformation, SecurityProvider provider, int nonceSize)
transformation - the transfomation for the Cipher.provider - the SecurityProvider.nonceSize - the nonce size.public CipherTransformation getTransformation()
CipherTransformation.public boolean isCreateRandomNonce()
false by default. You may override this method to create a random nonce individually
but only if you know exactly what you are doing and what are the details about the cryptographic algorithm.true if the nonce should be created individually from
SecureRandom, false to get from initialization vector.public final int getNonceSize()
AbstractGetNonceSizeCipher this API is designed for ease of use. Some cryptographic algorithms require an
initialization vector (IV) and others do not. With this API you do not have to
care and cannot do things wrong. The nonce will be prepended automatically to the encrypted payload and
reconstructed from there on decryption. This works both for crypt
and for streaming.getNonceSize in interface AbstractGetNonceSize0 for none.Cipher.getIV()Copyright © 2001–2019 mmm-Team. All rights reserved.