Class AESCipher

java.lang.Object
com.itextpdf.kernel.crypto.AESCipher

public class AESCipher extends Object
Creates an AES Cipher with CBC and padding PKCS5/7.
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • CIPHER_WITH_PKCS5_PADDING

      private static final String CIPHER_WITH_PKCS5_PADDING
      See Also:
    • BOUNCY_CASTLE_FACTORY

      private static final IBouncyCastleFactory BOUNCY_CASTLE_FACTORY
    • cipher

      private final Cipher 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 decryption
      key - the key to be used in the cipher
      iv - initialization vector to be used in cipher
  • Method Details

    • update

      public byte[] update(byte[] inp, int inpOff, int inpLen)
    • doFinal

      public byte[] doFinal()