Package org.conscrypt
Class OpenSSLAeadCipherAES
- java.lang.Object
-
- javax.crypto.CipherSpi
-
- org.conscrypt.OpenSSLCipher
-
- org.conscrypt.OpenSSLAeadCipher
-
- org.conscrypt.OpenSSLAeadCipherAES
-
- Direct Known Subclasses:
OpenSSLAeadCipherAES.GCM
,OpenSSLAeadCipherAES.GCM_SIV
@Internal public abstract class OpenSSLAeadCipherAES extends OpenSSLAeadCipher
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OpenSSLAeadCipherAES.GCM
static class
OpenSSLAeadCipherAES.GCM_SIV
-
Nested classes/interfaces inherited from class org.conscrypt.OpenSSLCipher
OpenSSLCipher.Mode, OpenSSLCipher.Padding
-
-
Field Summary
Fields Modifier and Type Field Description private static int
AES_BLOCK_SIZE
-
Fields inherited from class org.conscrypt.OpenSSLAeadCipher
buf, bufCount, DEFAULT_TAG_SIZE_BITS, evpAead, tagLengthInBytes
-
Fields inherited from class org.conscrypt.OpenSSLCipher
encodedKey, iv, mode
-
-
Constructor Summary
Constructors Constructor Description OpenSSLAeadCipherAES(OpenSSLCipher.Mode mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
checkSupportedKeySize(int keyLength)
Checks whether the cipher supports this particularkeySize
(in bytes) and throwsInvalidKeyException
if it doesn't.protected java.security.AlgorithmParameters
engineGetParameters()
(package private) java.lang.String
getBaseCipherName()
Returns the standard name for the particular algorithm.(package private) int
getCipherBlockSize()
(package private) int
getOutputSizeForFinal(int inputLen)
The size of output ifdoFinal()
is called with thisinputLen
.protected java.security.spec.AlgorithmParameterSpec
getParameterSpec(java.security.AlgorithmParameters params)
-
Methods inherited from class org.conscrypt.OpenSSLAeadCipher
allowsNonceReuse, checkSupportedPadding, checkSupportedTagLength, doFinalInternal, doFinalInternal, engineDoFinal, engineDoFinal, engineInitInternal, engineUpdateAAD, engineUpdateAAD, getEVP_AEAD, getOutputSizeForUpdate, updateInternal
-
Methods inherited from class org.conscrypt.OpenSSLCipher
checkSupportedMode, engineDoFinal, engineGetBlockSize, engineGetIV, engineGetKeySize, engineGetOutputSize, engineInit, engineInit, engineInit, engineSetMode, engineSetPadding, engineUnwrap, engineUpdate, engineUpdate, engineWrap, getPadding, isEncrypting, supportsVariableSizeIv, supportsVariableSizeKey
-
-
-
-
Field Detail
-
AES_BLOCK_SIZE
private static final int AES_BLOCK_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OpenSSLAeadCipherAES
OpenSSLAeadCipherAES(OpenSSLCipher.Mode mode)
-
-
Method Detail
-
checkSupportedKeySize
void checkSupportedKeySize(int keyLength) throws java.security.InvalidKeyException
Description copied from class:OpenSSLCipher
Checks whether the cipher supports this particularkeySize
(in bytes) and throwsInvalidKeyException
if it doesn't.- Specified by:
checkSupportedKeySize
in classOpenSSLCipher
- Throws:
java.security.InvalidKeyException
-
getBaseCipherName
java.lang.String getBaseCipherName()
Description copied from class:OpenSSLCipher
Returns the standard name for the particular algorithm.- Specified by:
getBaseCipherName
in classOpenSSLCipher
-
getCipherBlockSize
int getCipherBlockSize()
- Specified by:
getCipherBlockSize
in classOpenSSLCipher
-
getParameterSpec
protected java.security.spec.AlgorithmParameterSpec getParameterSpec(java.security.AlgorithmParameters params) throws java.security.InvalidAlgorithmParameterException
- Overrides:
getParameterSpec
in classOpenSSLCipher
- Throws:
java.security.InvalidAlgorithmParameterException
-
engineGetParameters
protected java.security.AlgorithmParameters engineGetParameters()
- Overrides:
engineGetParameters
in classOpenSSLCipher
-
getOutputSizeForFinal
int getOutputSizeForFinal(int inputLen)
Description copied from class:OpenSSLCipher
The size of output ifdoFinal()
is called with thisinputLen
. If padding is enabled and the size of the input puts it right at the block size, it will add another block for the padding.- Overrides:
getOutputSizeForFinal
in classOpenSSLAeadCipher
-
-