Package com.zwl.util.zip.impl

Examples of com.zwl.util.zip.impl.AESEncrypter.encrypt()


    zipOS.writeBytes(aesEncrypter.getPwVerification());

    byte[] data = new byte[1024];
    int read = zipData.read(data);
    while (read != -1) {
      aesEncrypter.encrypt(data, read);
      zipOS.writeBytes(data, 0, read);
      read = zipData.read(data);
    }

    byte[] finalAuthentication = aesEncrypter.getFinalAuthentication();
View Full Code Here


    zipOS.putNextEntry(entry);
    // ZIP-file data contains: 1. salt 2. pwVerification 3. encryptedContent 4. authenticationCode
    zipOS.writeBytes(aesEncrypter.getSalt());
    zipOS.writeBytes(aesEncrypter.getPwVerification());

    aesEncrypter.encrypt(data, data.length);
    zipOS.writeBytes(data, 0, data.length);

    byte[] finalAuthentication = aesEncrypter.getFinalAuthentication();
    if (LOG.isLoggable(Level.FINE)) {
      LOG.fine("finalAuthentication=" + Arrays.toString(finalAuthentication) + " at pos="
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.