Package net.lingala.zip4j.crypto
Class AESDecrypter
java.lang.Object
net.lingala.zip4j.crypto.AESDecrypter
- All Implemented Interfaces:
Decrypter
AES Decrypter supports AE-1 and AE-2 decryption for AES-CTR with 128, 192, or 256 Key Strength
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AESEngine
private byte[]
private byte[]
private MacBasedPRF
private int
-
Constructor Summary
ConstructorsConstructorDescriptionAESDecrypter
(AESExtraDataRecord aesExtraDataRecord, char[] password, byte[] salt, byte[] passwordVerifier, boolean useUtf8ForPassword) -
Method Summary
Modifier and TypeMethodDescriptionint
decryptData
(byte[] buff, int start, int len) byte[]
getCalculatedAuthenticationBytes
(int numberOfBytesPushedBack) private void
init
(byte[] salt, byte[] passwordVerifier, char[] password, AESExtraDataRecord aesExtraDataRecord, boolean useUtf8ForPassword)
-
Field Details
-
aesEngine
-
mac
-
nonce
private int nonce -
iv
private byte[] iv -
counterBlock
private byte[] counterBlock
-
-
Constructor Details
-
AESDecrypter
public AESDecrypter(AESExtraDataRecord aesExtraDataRecord, char[] password, byte[] salt, byte[] passwordVerifier, boolean useUtf8ForPassword) throws ZipException - Throws:
ZipException
-
-
Method Details
-
init
private void init(byte[] salt, byte[] passwordVerifier, char[] password, AESExtraDataRecord aesExtraDataRecord, boolean useUtf8ForPassword) throws ZipException - Throws:
ZipException
-
decryptData
- Specified by:
decryptData
in interfaceDecrypter
- Throws:
ZipException
-
getCalculatedAuthenticationBytes
public byte[] getCalculatedAuthenticationBytes(int numberOfBytesPushedBack)
-