Package org.conscrypt
Class OpenSSLAeadCipherChaCha20
- java.lang.Object
-
- javax.crypto.CipherSpi
-
- org.conscrypt.OpenSSLCipher
-
- org.conscrypt.OpenSSLAeadCipher
-
- org.conscrypt.OpenSSLAeadCipherChaCha20
-
@Internal public class OpenSSLAeadCipherChaCha20 extends OpenSSLAeadCipher
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.conscrypt.OpenSSLCipher
OpenSSLCipher.Mode, OpenSSLCipher.Padding
-
-
Field Summary
-
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 OpenSSLAeadCipherChaCha20()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidcheckSupportedKeySize(int keyLength)Checks whether the cipher supports this particularkeySize(in bytes) and throwsInvalidKeyExceptionif it doesn't.(package private) voidcheckSupportedMode(OpenSSLCipher.Mode mode)Checks whether the cipher supports this particular ciphermodeand throwsNoSuchAlgorithmExceptionif it doesn't.(package private) java.lang.StringgetBaseCipherName()Returns the standard name for the particular algorithm.(package private) intgetCipherBlockSize()(package private) longgetEVP_AEAD(int keyLength)(package private) intgetOutputSizeForFinal(int inputLen)The size of output ifdoFinal()is called with thisinputLen.-
Methods inherited from class org.conscrypt.OpenSSLAeadCipher
allowsNonceReuse, checkSupportedPadding, checkSupportedTagLength, doFinalInternal, doFinalInternal, engineDoFinal, engineDoFinal, engineInitInternal, engineUpdateAAD, engineUpdateAAD, getOutputSizeForUpdate, updateInternal
-
Methods inherited from class org.conscrypt.OpenSSLCipher
engineDoFinal, engineGetBlockSize, engineGetIV, engineGetKeySize, engineGetOutputSize, engineGetParameters, engineInit, engineInit, engineInit, engineSetMode, engineSetPadding, engineUnwrap, engineUpdate, engineUpdate, engineWrap, getPadding, getParameterSpec, isEncrypting, supportsVariableSizeIv, supportsVariableSizeKey
-
-
-
-
Method Detail
-
checkSupportedKeySize
void checkSupportedKeySize(int keyLength) throws java.security.InvalidKeyExceptionDescription copied from class:OpenSSLCipherChecks whether the cipher supports this particularkeySize(in bytes) and throwsInvalidKeyExceptionif it doesn't.- Specified by:
checkSupportedKeySizein classOpenSSLCipher- Throws:
java.security.InvalidKeyException
-
getBaseCipherName
java.lang.String getBaseCipherName()
Description copied from class:OpenSSLCipherReturns the standard name for the particular algorithm.- Specified by:
getBaseCipherNamein classOpenSSLCipher
-
getCipherBlockSize
int getCipherBlockSize()
- Specified by:
getCipherBlockSizein classOpenSSLCipher
-
checkSupportedMode
void checkSupportedMode(OpenSSLCipher.Mode mode) throws java.security.NoSuchAlgorithmException
Description copied from class:OpenSSLCipherChecks whether the cipher supports this particular ciphermodeand throwsNoSuchAlgorithmExceptionif it doesn't.- Specified by:
checkSupportedModein classOpenSSLCipher- Throws:
java.security.NoSuchAlgorithmException
-
getEVP_AEAD
long getEVP_AEAD(int keyLength) throws java.security.InvalidKeyException- Specified by:
getEVP_AEADin classOpenSSLAeadCipher- Throws:
java.security.InvalidKeyException
-
getOutputSizeForFinal
int getOutputSizeForFinal(int inputLen)
Description copied from class:OpenSSLCipherThe 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:
getOutputSizeForFinalin classOpenSSLAeadCipher
-
-