AESCipher

Overview

AESCipher is a class in Aspose.PDF FOSS for Java.

AES cipher for PDF encryption and decryption — CBC mode.

This class provides 4 methods for working with AESCipher objects in Java programs. Available methods include: decrypt, decryptWithIV, encrypt, encryptWithIV. All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package.

Methods

SignatureDescription
encrypt(key: byte[], data: byte[])byte[]Encrypts data using AES-CBC with PKCS5 padding and a random IV.
encryptWithIV(key: byte[], iv: byte[], plaintext: byte[])byte[]Encrypts data using AES-CBC with an explicit IV and no padding.
decrypt(key: byte[], data: byte[])byte[]Decrypts AES-CBC encrypted data.
decryptWithIV(key: byte[], iv: byte[], cipherText: byte[])byte[]Decrypts with explicit IV (for R=6 key recovery where IV is all zeros).

See Also

 English