Class AesGcmDecryptor
java.lang.Object
com.itextpdf.kernel.crypto.AesGcmDecryptor
- All Implemented Interfaces:
IDecryptor
Class for decrypting aes-gcm encrypted bytes.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAesGcmDecryptor(byte[] key, int off, int len) Creates a new instance ofAesGcmDecryptor. -
Method Summary
-
Field Details
-
cipher
-
key
private final byte[] key -
initiated
private boolean initiated -
iv
private final byte[] iv -
ivptr
private int ivptr
-
-
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 decryptionoff- offset of the key in the byte arraylen- 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:
updatein interfaceIDecryptor- Parameters:
b- the input bufferoff- the offset in input where the input startslen- the input length- Returns:
- decrypted bytes array
-
finish
public byte[] finish()Finishes a multiple-part decryption operation.- Specified by:
finishin interfaceIDecryptor- Returns:
- input data that may have been buffered during a previous update operation
-