Package com.itextpdf.kernel.crypto
Class AesGcmDecryptor
java.lang.Object
com.itextpdf.kernel.crypto.AesGcmDecryptor
- All Implemented Interfaces:
-
IDecryptor
Class for decrypting aes-gcm encrypted bytes.
-
Constructor Summary
ConstructorDescriptionAesGcmDecryptor
(byte[] key, int off, int len) Creates a new instance ofAesGcmDecryptor
. -
Method Summary
-
Constructor Details
-
AesGcmDecryptor
public AesGcmDecryptor(byte[] key, int off, int len) Creates a new instance ofAesGcmDecryptor
.- Parameters:
-
key
- the byte array containing the key for decryption -
off
- offset of the key in the byte array -
len
- the length of the key in the byte array
-
-
Method Details
-
update
public byte[] update(byte[] b, int off, int len) Continues a multiple-part decryption operation, processing another data part and initializing aes-gcm cipher if this method called for the first time.- Specified by:
-
update
in interfaceIDecryptor
- Parameters:
-
b
- the input buffer -
off
- the offset in input where the input starts -
len
- the input length - Returns:
- decrypted bytes array
-
finish
public byte[] finish()Finishes a multiple-part decryption operation.- Specified by:
-
finish
in interfaceIDecryptor
- Returns:
- input data that may have been buffered during a previous update operation
-