congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
AesZipFileEncrypter.add
Code IndexAdd Tabnine to your IDE (free)

How to use
add
method
in
de.idyl.winzipaes.AesZipFileEncrypter

Best Java code snippets using de.idyl.winzipaes.AesZipFileEncrypter.add (Showing top 11 results out of 315)

origin: redfish64/TinyTravelTracker

/**
 * Add un-encrypted + un-zipped file to encrypted zip file.<br>
 *
 * @param file to add
 * @param pathForEntry to be used for addition of the file (path within zip file)
 * @param password to be used for encryption
 */
public void add(File file, String pathForEntry, String password) throws IOException, UnsupportedEncodingException {
  FileInputStream fis = new FileInputStream(file);
  try {
    add(pathForEntry, fis, password);
  } finally {
    fis.close();
  }
}
origin: de.idyl/winzipaes

/**
 * Add un-encrypted + un-zipped file to encrypted zip file.<br>
 *
 * @param file to add
 * @param pathForEntry to be used for addition of the file (path within zip file)
 * @param password to be used for encryption
 */
public void add(File file, String pathForEntry, String password) throws IOException, UnsupportedEncodingException {
  FileInputStream fis = new FileInputStream(file);
  try {
    add(pathForEntry, fis, password);
  } finally {
    fis.close();
  }
}
origin: org.keycloak/keycloak-export-import-impl

@Override
public <T> void writeEntities(String fileName, List<T> entities) {
  try {
    ByteArrayOutputStream stream = new ByteArrayOutputStream();
    this.objectMapper.writeValue(stream, entities);
    byte[] byteArray = stream.toByteArray();
    this.encrypter.add(fileName, new ByteArrayInputStream(byteArray), this.password);
  } catch (IOException ioe) {
    throw new RuntimeException(ioe);
  }
}
origin: de.idyl/winzipaes

/**
 * Add un-encrypted + un-zipped file to encrypted zip file.
 * 
 * @param file to add, provides the path of the file within the zip file via its getPath()
 * @param password to be used for encryption
 */
public void add(File file, String password) throws IOException, UnsupportedEncodingException {
  FileInputStream fis = new FileInputStream(file);
  try {
    add(file.getPath(), fis, password);
  } finally {
    fis.close();
  }
}
origin: redfish64/TinyTravelTracker

/**
 * Add un-encrypted + un-zipped file to encrypted zip file.
 * 
 * @param file to add, provides the path of the file within the zip file via its getPath()
 * @param password to be used for encryption
 */
public void add(File file, String password) throws IOException, UnsupportedEncodingException {
  FileInputStream fis = new FileInputStream(file);
  try {
    add(file.getPath(), fis, password);
  } finally {
    fis.close();
  }
}
origin: de.idyl/winzipaes

/**
 * Take all elements (files) from zip file and add them ENCRYPTED with password to the new zip
 * file created with this instance. <br>
 * Encrypted data of each file has the same size as the compressed data, though the file size is
 * increased by 26 bytes for salt and pw-verification bytes.<br>
 * While the {@link #add(File, String)} method does not need an additional zip file, this method
 * comes in handy, when your input data is larger than your available memory. 
 * 
 * @param pathToZipFile
 *          provides zipFileEntries for encryption
 * @param password
 *          used to perform the encryption
 * @throws IOException
 */
public void addAll(File pathToZipFile, String password) throws IOException {
  ZipFile zipFile = new ZipFile(pathToZipFile);
  try {
    add(zipFile, password);
  } finally {
    zipFile.close();
  }
}
origin: redfish64/TinyTravelTracker

/**
 * Take all elements (files) from zip file and add them ENCRYPTED with password to the new zip
 * file created with this instance. <br>
 * Encrypted data of each file has the same size as the compressed data, though the file size is
 * increased by 26 bytes for salt and pw-verification bytes.<br>
 * While the {@link #add(File, String)} method does not need an additional zip file, this method
 * comes in handy, when your input data is larger than your available memory. 
 * 
 * @param pathToZipFile
 *          provides zipFileEntries for encryption
 * @param password
 *          used to perform the encryption
 * @throws IOException
 */
public void addAll(File pathToZipFile, String password) throws IOException {
  ZipFile zipFile = new ZipFile(pathToZipFile);
  try {
    add(zipFile, password);
  } finally {
    zipFile.close();
  }
}
origin: de.idyl/winzipaes

protected void add(ZipFile inFile, String password) throws IOException,
    UnsupportedEncodingException {
  ZipFileEntryInputStream zfe = new ZipFileEntryInputStream(inFile.getName());			
  try {
    Enumeration<? extends ZipEntry> en = inFile.entries();
    while (en.hasMoreElements()) {
      ZipEntry ze = en.nextElement();
      zfe.nextEntry(ze);
      add(ze, zfe, password);
    }
  } finally {
    zfe.close();
  }
}
origin: de.idyl/winzipaes

/**
 * Zip + encrypt one "inFile" to one "outZipFile" using "password".
 */
public static void zipAndEncrypt(File inFile, File outFile, String password, AESEncrypter encrypter) throws IOException {
  AesZipFileEncrypter enc = new AesZipFileEncrypter(outFile,encrypter);
  try {
    enc.add(inFile, password);
  } finally {
    enc.close();
  }
}
origin: redfish64/TinyTravelTracker

protected void add(ZipFile inFile, String password) throws IOException,
    UnsupportedEncodingException {
  ZipFileEntryInputStream zfe = new ZipFileEntryInputStream(inFile.getName());			
  try {
    Enumeration<? extends ZipEntry> en = inFile.entries();
    while (en.hasMoreElements()) {
      ZipEntry ze = en.nextElement();
      zfe.nextEntry(ze);
      add(ze, zfe, password);
    }
  } finally {
    zfe.close();
  }
}
origin: redfish64/TinyTravelTracker

/**
 * Zip + encrypt one "inFile" to one "outZipFile" using "password".
 */
public static void zipAndEncrypt(File inFile, File outFile, String password, AESEncrypter encrypter) throws IOException {
  AesZipFileEncrypter enc = new AesZipFileEncrypter(outFile,encrypter);
  try {
    enc.add(inFile, password);
  } finally {
    enc.close();
  }
}
de.idyl.winzipaesAesZipFileEncrypteradd

Javadoc

Add un-encrypted + un-zipped file to encrypted zip file.

Popular methods of AesZipFileEncrypter

  • <init>
  • close
    Client is required to call this method after he added all entries so the final archive part is writt
  • addAll
    Take all elements (files) from zip file and add them ENCRYPTED with password to the new zip file cre

Popular in Java

  • Updating database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (Timer)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Permission (java.security)
    Legacy security code; do not use.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • BoxLayout (javax.swing)
  • JFrame (javax.swing)
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now