Class AESCipher
- java.lang.Object
-
- javax.crypto.CipherSpi
-
- com.fortanix.sdkms.jce.provider.ciphers.AESCipher
-
- Direct Known Subclasses:
AESCipher.Aes128CbcNOPadding,AESCipher.Aes128CbcPKCS5Padding,AESCipher.Aes128CcmPKCS5Padding,AESCipher.Aes128CfbPKCS5Padding,AESCipher.Aes128CtrPKCS5Padding,AESCipher.Aes128EcbPKCS5Padding,AESCipher.Aes128Ff1NOPadding,AESCipher.Aes128FpeNOPadding,AESCipher.Aes128GcmNoPadding,AESCipher.Aes128GcmPKCS5Padding,AESCipher.Aes128OfbPKCS5Padding,AESCipher.Aes192CbcNOPadding,AESCipher.Aes192CbcPKCS5Padding,AESCipher.Aes192CcmPKCS5Padding,AESCipher.Aes192CfbPKCS5Padding,AESCipher.Aes192CtrPKCS5Padding,AESCipher.Aes192EcbPKCS5Padding,AESCipher.Aes192Ff1NOPadding,AESCipher.Aes192FpeNOPadding,AESCipher.Aes192GcmNoPadding,AESCipher.Aes192GcmPKCS5Padding,AESCipher.Aes192OfbPKCS5Padding,AESCipher.Aes256CbcNOPadding,AESCipher.Aes256CbcPKCS5Padding,AESCipher.Aes256CcmPKCS5Padding,AESCipher.Aes256CfbPKCS5Padding,AESCipher.Aes256CtrPKCS5Padding,AESCipher.Aes256EcbPKCS5Padding,AESCipher.Aes256Ff1NOPadding,AESCipher.Aes256FpeNOPadding,AESCipher.Aes256GcmNoPadding,AESCipher.Aes256GcmPKCS5Padding,AESCipher.Aes256OfbPKCS5Padding
public abstract class AESCipher extends CipherSpi
AESCipher implements the AES algorithm in its various modes (ECB,CFB,OFB,CBC) and padding schemes (PKCS5Padding,NoPadding)
-
-
Nested Class Summary
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]engineDoFinal(byte[] input, int inputOffset, int inputLen)protected intengineDoFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)protected intengineGetBlockSize()protected byte[]engineGetIV()protected intengineGetKeySize(Key key)protected intengineGetOutputSize(int inputLength)protected AlgorithmParametersengineGetParameters()protected voidengineInit(int opMode, Key key, AlgorithmParameters params, SecureRandom random)protected voidengineInit(int opMode, Key key, SecureRandom random)protected voidengineInit(int opMode, Key key, AlgorithmParameterSpec params, SecureRandom random)protected voidengineSetMode(String mode)protected voidengineSetPadding(String padding)protected KeyengineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType)protected byte[]engineUpdate(byte[] input, int inputOffset, int inputLength)protected intengineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)protected voidengineUpdateAAD(byte[] src, int offset, int len)protected voidengineUpdateAAD(ByteBuffer byteBuffer)protected byte[]engineWrap(Key key)-
Methods inherited from class javax.crypto.CipherSpi
engineDoFinal, engineUpdate
-
-
-
-
Method Detail
-
engineDoFinal
protected byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen) throws IllegalBlockSizeException, BadPaddingException- Specified by:
engineDoFinalin classCipherSpi- Throws:
IllegalBlockSizeExceptionBadPaddingException
-
engineDoFinal
protected int engineDoFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException, IllegalBlockSizeException, BadPaddingException- Specified by:
engineDoFinalin classCipherSpi- Throws:
ShortBufferExceptionIllegalBlockSizeExceptionBadPaddingException
-
engineGetBlockSize
protected int engineGetBlockSize()
- Specified by:
engineGetBlockSizein classCipherSpi
-
engineGetIV
protected byte[] engineGetIV()
- Specified by:
engineGetIVin classCipherSpi
-
engineGetKeySize
protected int engineGetKeySize(Key key) throws InvalidKeyException
- Overrides:
engineGetKeySizein classCipherSpi- Throws:
InvalidKeyException
-
engineGetOutputSize
protected int engineGetOutputSize(int inputLength)
- Specified by:
engineGetOutputSizein classCipherSpi
-
engineGetParameters
protected AlgorithmParameters engineGetParameters()
- Specified by:
engineGetParametersin classCipherSpi
-
engineInit
protected void engineInit(int opMode, Key key, SecureRandom random) throws InvalidKeyException- Specified by:
engineInitin classCipherSpi- Throws:
InvalidKeyException
-
engineInit
protected void engineInit(int opMode, Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException- Specified by:
engineInitin classCipherSpi- Throws:
InvalidKeyExceptionInvalidAlgorithmParameterException
-
engineInit
protected void engineInit(int opMode, Key key, AlgorithmParameters params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException- Specified by:
engineInitin classCipherSpi- Throws:
InvalidKeyExceptionInvalidAlgorithmParameterException
-
engineSetMode
protected void engineSetMode(String mode) throws NoSuchAlgorithmException
- Specified by:
engineSetModein classCipherSpi- Throws:
NoSuchAlgorithmException
-
engineSetPadding
protected void engineSetPadding(String padding) throws NoSuchPaddingException
- Specified by:
engineSetPaddingin classCipherSpi- Throws:
NoSuchPaddingException
-
engineUpdate
protected byte[] engineUpdate(byte[] input, int inputOffset, int inputLength)- Specified by:
engineUpdatein classCipherSpi
-
engineUpdate
protected int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException- Specified by:
engineUpdatein classCipherSpi- Throws:
ShortBufferException
-
engineUpdateAAD
protected void engineUpdateAAD(byte[] src, int offset, int len)- Overrides:
engineUpdateAADin classCipherSpi
-
engineWrap
protected byte[] engineWrap(Key key) throws IllegalBlockSizeException, InvalidKeyException
- Overrides:
engineWrapin classCipherSpi- Throws:
IllegalBlockSizeExceptionInvalidKeyException
-
engineUnwrap
protected Key engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType) throws InvalidKeyException, NoSuchAlgorithmException
- Overrides:
engineUnwrapin classCipherSpi- Parameters:
wrappedKeyType- the type of the wrapped key. This is one ofCipher.SECRET_KEY,Cipher.PRIVATE_KEY, orCipher.PUBLIC_KEY.wrappedKeyAlgorithm- the type of key algorithm. This is one of the .....wrappedKeyType- wrapped key type- Throws:
InvalidKeyExceptionNoSuchAlgorithmException
-
engineUpdateAAD
protected void engineUpdateAAD(ByteBuffer byteBuffer)
- Overrides:
engineUpdateAADin classCipherSpi
-
-