Package com.itextpdf.kernel.crypto
Class AESCipher
- java.lang.Object
-
- com.itextpdf.kernel.crypto.AESCipher
-
public class AESCipher extends java.lang.ObjectCreates an AES Cipher with CBC and padding PKCS5/7.
-
-
Field Summary
Fields Modifier and Type Field Description private static IBouncyCastleFactoryBOUNCY_CASTLE_FACTORYprivate javax.crypto.Ciphercipherprivate static java.lang.StringCIPHER_WITH_PKCS5_PADDINGprivate static org.slf4j.LoggerLOGGER
-
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
-
-