Package com.itextpdf.kernel.crypto
Class AESCipher
java.lang.Object
com.itextpdf.kernel.crypto.AESCipher
Creates an AES Cipher with CBC and padding PKCS5/7.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final IBouncyCastleFactory
private final Cipher
private static final String
private static final org.slf4j.Logger
-
Constructor Summary
ConstructorsConstructorDescriptionAESCipher
(boolean forEncryption, byte[] key, byte[] iv) Creates a new instance of AESCipher -
Method Summary
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
CIPHER_WITH_PKCS5_PADDING
- See Also:
-
BOUNCY_CASTLE_FACTORY
-
cipher
-
-
Constructor Details
-
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
-
-
Method Details
-
update
public byte[] update(byte[] inp, int inpOff, int inpLen) -
doFinal
public byte[] doFinal()
-