public static class OpenSSLCipher.EVP_AEAD.AES.GCM extends OpenSSLCipher.EVP_AEAD.AES
| Modifier and Type | Class and Description |
|---|---|
static class |
OpenSSLCipher.EVP_AEAD.AES.GCM.AES_128 |
static class |
OpenSSLCipher.EVP_AEAD.AES.GCM.AES_256 |
OpenSSLCipher.EVP_AEAD.AES.GCMOpenSSLCipher.EVP_AEAD.AESOpenSSLCipher.EVP_AEAD, OpenSSLCipher.EVP_CIPHER, OpenSSLCipher.Mode, OpenSSLCipher.Paddingbuf, bufCount, evpAeadencodedKey, iv, mode| Constructor and Description |
|---|
GCM() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkSupportedMode(OpenSSLCipher.Mode mode)
Checks whether the cipher supports this particular cipher
mode
and throws NoSuchAlgorithmException if it doesn't. |
protected int |
doFinalInternal(byte[] output,
int outputOffset,
int maximumLen)
API-specific implementation of the final block.
|
protected void |
engineInitInternal(byte[] encodedKey,
AlgorithmParameterSpec params,
SecureRandom random)
API-specific implementation of initializing the cipher.
|
protected void |
engineUpdateAAD(byte[] input,
int inputOffset,
int inputLen) |
protected long |
getEVP_AEAD(int keyLength) |
protected int |
updateInternal(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset,
int maximumLen)
API-specific implementation of updating the cipher.
|
checkSupportedKeySize, getBaseCipherName, getCipherBlockSize, getOutputSizeForUpdatecheckSupportedPadding, engineGetParameters, getOutputSizeForFinalengineDoFinal, engineDoFinal, engineGetBlockSize, engineGetIV, engineGetOutputSize, engineInit, engineInit, engineInit, engineSetMode, engineSetPadding, engineUnwrap, engineUpdate, engineUpdate, engineWrap, getPadding, isEncrypting, supportsVariableSizeIv, supportsVariableSizeKeyengineDoFinal, engineGetKeySize, engineUpdate, engineUpdateAADprotected void engineInitInternal(byte[] encodedKey,
AlgorithmParameterSpec params,
SecureRandom random)
throws InvalidKeyException,
InvalidAlgorithmParameterException
OpenSSLCipherOpenSSLCipher.isEncrypting() function will tell whether it should be
initialized for encryption or decryption. The encodedKey will be
the bytes of a supported key size.engineInitInternal in class OpenSSLCipher.EVP_AEADInvalidKeyExceptionInvalidAlgorithmParameterExceptionprotected int updateInternal(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset,
int maximumLen)
throws ShortBufferException
OpenSSLCiphermaximumLen will be the maximum length of the output as returned
by OpenSSLCipher.getOutputSizeForUpdate(int). The return value must be the
number of bytes processed and placed into output. On error, an
exception must be thrown.updateInternal in class OpenSSLCipher.EVP_AEADShortBufferExceptionprotected int doFinalInternal(byte[] output,
int outputOffset,
int maximumLen)
throws IllegalBlockSizeException,
BadPaddingException
OpenSSLCiphermaximumLen
will be the maximum length of the possible output as returned by
OpenSSLCipher.getOutputSizeForFinal(int). The return value must be the number
of bytes processed and placed into output. On error, an exception
must be thrown.doFinalInternal in class OpenSSLCipher.EVP_AEADIllegalBlockSizeExceptionBadPaddingExceptionprotected void engineUpdateAAD(byte[] input,
int inputOffset,
int inputLen)
engineUpdateAAD in class OpenSSLCipher.EVP_AEADprotected void checkSupportedMode(OpenSSLCipher.Mode mode) throws NoSuchAlgorithmException
OpenSSLCiphermode
and throws NoSuchAlgorithmException if it doesn't.checkSupportedMode in class OpenSSLCipherNoSuchAlgorithmExceptionprotected long getEVP_AEAD(int keyLength)
throws InvalidKeyException
getEVP_AEAD in class OpenSSLCipher.EVP_AEADInvalidKeyException