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.GCM
OpenSSLCipher.EVP_AEAD.AES
OpenSSLCipher.EVP_AEAD, OpenSSLCipher.EVP_CIPHER, OpenSSLCipher.Mode, OpenSSLCipher.Padding
buf, bufCount, evpAead
encodedKey, 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, getOutputSizeForUpdate
checkSupportedPadding, engineGetParameters, getOutputSizeForFinal
engineDoFinal, engineDoFinal, engineGetBlockSize, engineGetIV, engineGetOutputSize, engineInit, engineInit, engineInit, engineSetMode, engineSetPadding, engineUnwrap, engineUpdate, engineUpdate, engineWrap, getPadding, isEncrypting, supportsVariableSizeIv, supportsVariableSizeKey
engineDoFinal, engineGetKeySize, engineUpdate, engineUpdateAAD
protected void engineInitInternal(byte[] encodedKey, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException
OpenSSLCipher
OpenSSLCipher.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_AEAD
InvalidKeyException
InvalidAlgorithmParameterException
protected int updateInternal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset, int maximumLen) throws ShortBufferException
OpenSSLCipher
maximumLen
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_AEAD
ShortBufferException
protected int doFinalInternal(byte[] output, int outputOffset, int maximumLen) throws IllegalBlockSizeException, BadPaddingException
OpenSSLCipher
maximumLen
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_AEAD
IllegalBlockSizeException
BadPaddingException
protected void engineUpdateAAD(byte[] input, int inputOffset, int inputLen)
engineUpdateAAD
in class OpenSSLCipher.EVP_AEAD
protected void checkSupportedMode(OpenSSLCipher.Mode mode) throws NoSuchAlgorithmException
OpenSSLCipher
mode
and throws NoSuchAlgorithmException
if it doesn't.checkSupportedMode
in class OpenSSLCipher
NoSuchAlgorithmException
protected long getEVP_AEAD(int keyLength) throws InvalidKeyException
getEVP_AEAD
in class OpenSSLCipher.EVP_AEAD
InvalidKeyException