Package net.lingala.zip4j.crypto
Class StandardEncrypter
- java.lang.Object
-
- net.lingala.zip4j.crypto.StandardEncrypter
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]headerBytesprivate ZipCryptoEnginezipCryptoEngine
-
Constructor Summary
Constructors Constructor Description StandardEncrypter(char[] password, long key, boolean useUtf8ForPassword)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byteencryptByte(byte val)intencryptData(byte[] buff)intencryptData(byte[] buff, int start, int len)protected byte[]generateRandomBytes()byte[]getHeaderBytes()private voidinit(char[] password, long key, boolean useUtf8ForPassword)
-
-
-
Field Detail
-
zipCryptoEngine
private final ZipCryptoEngine zipCryptoEngine
-
headerBytes
private byte[] headerBytes
-
-
Constructor Detail
-
StandardEncrypter
public StandardEncrypter(char[] password, long key, boolean useUtf8ForPassword) throws ZipException- Throws:
ZipException
-
-
Method Detail
-
init
private void init(char[] password, long key, boolean useUtf8ForPassword) throws ZipException- Throws:
ZipException
-
encryptData
public int encryptData(byte[] buff) throws ZipException- Specified by:
encryptDatain interfaceEncrypter- Throws:
ZipException
-
encryptData
public int encryptData(byte[] buff, int start, int len) throws ZipException- Specified by:
encryptDatain interfaceEncrypter- Throws:
ZipException
-
encryptByte
protected byte encryptByte(byte val)
-
generateRandomBytes
protected byte[] generateRandomBytes()
-
getHeaderBytes
public byte[] getHeaderBytes()
-
-