class AesGcm extends ContentCryptoScheme
AES_CBC, AES_CTR, AES_GCM, MAX_CBC_BYTES, MAX_CTR_BYTES, MAX_GCM_BLOCKS, MAX_GCM_BYTES
Constructor and Description |
---|
AesGcm() |
Modifier and Type | Method and Description |
---|---|
(package private) CipherLite |
createAuxillaryCipher(javax.crypto.SecretKey cek,
byte[] ivOrig,
int cipherMode,
java.security.Provider securityProvider,
long startingBytePos) |
(package private) int |
getBlockSizeInBytes() |
(package private) java.lang.String |
getCipherAlgorithm() |
(package private) int |
getIVLengthInBytes() |
(package private) java.lang.String |
getKeyGeneratorAlgorithm() |
(package private) int |
getKeyLengthInBits() |
(package private) long |
getMaxPlaintextSize()
Returns the maximum size of the plaintext that can be encrypted using
the current scheme per a single secret key; or -1 if there is effectively
no limit.
|
(package private) java.lang.String |
getSpecificCipherProvider()
Currently only Bouncy Castle can support the AES/GCM cipher in
Java 6 without having to use the AEAD API in Java 7+.
|
(package private) int |
getTagLengthInBits()
Used to explicitly record the tag length in S3 for interoperability
with other services.
|
protected CipherLite |
newCipherLite(javax.crypto.Cipher cipher,
javax.crypto.SecretKey cek,
int cipherMode)
This is a factory method intended to be overridden by sublcasses to
return the appropriate instance of cipher lite.
|
adjustIV, createCipherLite, createCipherLite, fromCEKAlgo, fromCEKAlgo, getKeySpec, incrementBlocks, toString
java.lang.String getKeyGeneratorAlgorithm()
getKeyGeneratorAlgorithm
in class ContentCryptoScheme
java.lang.String getCipherAlgorithm()
getCipherAlgorithm
in class ContentCryptoScheme
int getKeyLengthInBits()
getKeyLengthInBits
in class ContentCryptoScheme
int getBlockSizeInBytes()
getBlockSizeInBytes
in class ContentCryptoScheme
int getIVLengthInBytes()
getIVLengthInBytes
in class ContentCryptoScheme
long getMaxPlaintextSize()
ContentCryptoScheme
getMaxPlaintextSize
in class ContentCryptoScheme
int getTagLengthInBits()
getTagLengthInBits
in class ContentCryptoScheme
java.lang.String getSpecificCipherProvider()
getSpecificCipherProvider
in class ContentCryptoScheme
CipherLite createAuxillaryCipher(javax.crypto.SecretKey cek, byte[] ivOrig, int cipherMode, java.security.Provider securityProvider, long startingBytePos) throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, javax.crypto.NoSuchPaddingException, java.security.InvalidAlgorithmParameterException
createAuxillaryCipher
in class ContentCryptoScheme
java.security.InvalidKeyException
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException
javax.crypto.NoSuchPaddingException
java.security.InvalidAlgorithmParameterException
protected CipherLite newCipherLite(javax.crypto.Cipher cipher, javax.crypto.SecretKey cek, int cipherMode)
ContentCryptoScheme
newCipherLite
in class ContentCryptoScheme