Class AESEncrypter
java.lang.Object
net.lingala.zip4j.crypto.AESEncrypter
- All Implemented Interfaces:
Encrypter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AESEngineprivate final byte[]private byte[]private booleanprivate final byte[]private intprivate MacBasedPRFprivate intprivate final SecureRandomprivate byte[] -
Constructor Summary
ConstructorsConstructorDescriptionAESEncrypter(char[] password, AesKeyStrength aesKeyStrength, boolean useUtf8ForPassword) -
Method Summary
Modifier and TypeMethodDescriptionintencryptData(byte[] buff) intencryptData(byte[] buff, int start, int len) private byte[]generateSalt(int size) byte[]byte[]byte[]private voidinit(char[] password, AesKeyStrength aesKeyStrength, boolean useUtf8ForPassword)
-
Field Details
-
aesEngine
-
mac
-
random
-
finished
private boolean finished -
nonce
private int nonce -
loopCount
private int loopCount -
iv
private final byte[] iv -
counterBlock
private final byte[] counterBlock -
derivedPasswordVerifier
private byte[] derivedPasswordVerifier -
saltBytes
private byte[] saltBytes
-
-
Constructor Details
-
AESEncrypter
public AESEncrypter(char[] password, AesKeyStrength aesKeyStrength, boolean useUtf8ForPassword) throws ZipException - Throws:
ZipException
-
-
Method Details
-
init
private void init(char[] password, AesKeyStrength aesKeyStrength, boolean useUtf8ForPassword) throws ZipException - Throws:
ZipException
-
encryptData
- Specified by:
encryptDatain interfaceEncrypter- Throws:
ZipException
-
encryptData
- Specified by:
encryptDatain interfaceEncrypter- Throws:
ZipException
-
generateSalt
- Throws:
ZipException
-
getFinalMac
public byte[] getFinalMac() -
getDerivedPasswordVerifier
public byte[] getDerivedPasswordVerifier() -
getSaltBytes
public byte[] getSaltBytes()
-