Package com.itextpdf.kernel.crypto
Class AESCipher
- java.lang.Object
-
- com.itextpdf.kernel.crypto.AESCipher
-
public class AESCipher extends java.lang.Object
Creates an AES Cipher with CBC and padding PKCS5/7.
-
-
Field Summary
Fields Modifier and Type Field Description private static IBouncyCastleFactory
BOUNCY_CASTLE_FACTORY
private javax.crypto.Cipher
cipher
private static java.lang.String
CIPHER_WITH_PKCS5_PADDING
private static org.slf4j.Logger
LOGGER
-
Constructor Summary
Constructors Constructor Description AESCipher(boolean forEncryption, byte[] key, byte[] iv)
Creates a new instance of AESCipher
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
doFinal()
byte[]
update(byte[] inp, int inpOff, int inpLen)
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
CIPHER_WITH_PKCS5_PADDING
private static final java.lang.String CIPHER_WITH_PKCS5_PADDING
- See Also:
- Constant Field Values
-
BOUNCY_CASTLE_FACTORY
private static final IBouncyCastleFactory BOUNCY_CASTLE_FACTORY
-
cipher
private final javax.crypto.Cipher cipher
-
-
Constructor Detail
-
AESCipher
public AESCipher(boolean forEncryption, byte[] key, byte[] iv)
Creates a new instance of AESCipher- Parameters:
forEncryption
- if true the cipher is initialised for encryption, if false for decryptionkey
- the key to be used in the cipheriv
- initialization vector to be used in cipher
-
-