Package com.itextpdf.kernel.crypto
Class AesGcmDecryptor
- java.lang.Object
-
- com.itextpdf.kernel.crypto.AesGcmDecryptor
-
- All Implemented Interfaces:
IDecryptor
public class AesGcmDecryptor extends java.lang.Object implements IDecryptor
Class for decrypting aes-gcm encrypted bytes.
-
-
Constructor Summary
Constructors Constructor Description AesGcmDecryptor(byte[] key, int off, int len)
Creates a new instance ofAesGcmDecryptor
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
finish()
Finishes a multiple-part decryption operation.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.
-
-
-
Field Detail
-
cipher
private AESGCMCipher cipher
-
key
private final byte[] key
-
initiated
private boolean initiated
-
iv
private final byte[] iv
-
ivptr
private int ivptr
-
-
Constructor Detail
-
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 Detail
-
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 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:
finish
in interfaceIDecryptor
- Returns:
- input data that may have been buffered during a previous update operation
-
-