Package com.itextpdf.kernel.crypto
Class AESCipherCBCnoPad
java.lang.Object
com.itextpdf.kernel.crypto.AESCipherCBCnoPad
Creates an AES Cipher with CBC and no padding.
-
Constructor Summary
ConstructorsConstructorDescriptionAESCipherCBCnoPad(boolean forEncryption, byte[] key) Creates a new instance of AESCipher with CBC and no paddingAESCipherCBCnoPad(boolean forEncryption, byte[] key, byte[] initVector) Creates a new instance of AESCipher with CBC and no padding -
Method Summary
Modifier and TypeMethodDescriptionbyte[]doFinal()Finishes a multiple-part encryption or decryption operation, depending on how this cipher was initialized.byte[]processBlock(byte[] inp, int inpOff, int inpLen) Performs a multiple-part encryption or decryption operation (depending on how this cipher was initialized), processing another data part.byte[]processFullBlock(byte[] inp, int inpOff, int inpLen) Performs a multiple-part encryption or decryption operation (depending on how this cipher was initialized), processing the full block with finalizing.
-
Constructor Details
-
AESCipherCBCnoPad
public AESCipherCBCnoPad(boolean forEncryption, byte[] key) Creates a new instance of AESCipher with CBC and no padding- Parameters:
-
forEncryption- if true the cipher is initialised for encryption, if false for decryption -
key- the key to be used in the cipher
-
AESCipherCBCnoPad
public AESCipherCBCnoPad(boolean forEncryption, byte[] key, byte[] initVector) Creates a new instance of AESCipher with CBC and no padding- Parameters:
-
forEncryption- if true the cipher is initialised for encryption, if false for decryption -
key- the key to be used in the cipher -
initVector- initialization vector to be used in cipher
-
-
Method Details
-
processBlock
public byte[] processBlock(byte[] inp, int inpOff, int inpLen) Performs a multiple-part encryption or decryption operation (depending on how this cipher was initialized), processing another data part.- Parameters:
-
inp- the input buffer -
inpOff- the offset in input where the input starts -
inpLen- the input length - Returns:
- byte array with the result
-
doFinal
public byte[] doFinal()Finishes a multiple-part encryption or decryption operation, depending on how this cipher was initialized.- Returns:
- byte array with the result
-
processFullBlock
public byte[] processFullBlock(byte[] inp, int inpOff, int inpLen) Performs a multiple-part encryption or decryption operation (depending on how this cipher was initialized), processing the full block with finalizing.- Parameters:
-
inp- the input buffer -
inpOff- the offset in input where the input starts -
inpLen- the input length - Returns:
- byte array with the result
-