de.schlichtherle.io
Class RaesFiles

java.lang.Object
  extended by de.schlichtherle.io.RaesFiles
Direct Known Subclasses:
RaesFileUtils

public class RaesFiles
extends Object

Saves and restores the contents of arbitrary files to and from the RAES file format for encryption and decryption. Note that this class is not intended to access RAES encrypted ZIP files - use the File class for this task instead.

Version:
TrueZIP 6.7
Author:
Christian Schlichtherle

Constructor Summary
protected RaesFiles()
          You cannot instantiate this class.
 
Method Summary
static void decrypt(String raesFilePath, String plainFilePath, boolean strongAuthentication)
          Decrypts the given RAES file to the given plain file.
static void decrypt(String raesFilePath, String plainFilePath, boolean strongAuthentication, ArchiveDetector detector)
          Decrypts the given RAES file to the given plain file, using the provided ArchiveDetector to detect any archvie files in its parent directory path except the files themselves, which are not recognized as archive files.
static void encrypt(String plainFilePath, String raesFilePath)
          Encrypts the given plain file to the given RAES file.
static void encrypt(String plainFilePath, String raesFilePath, ArchiveDetector detector)
          Encrypts the given plain file to the given RAES file, using the provided ArchiveDetector to detect any archive files in its parent directory path except the files themselves, which are not recognized as archive files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RaesFiles

protected RaesFiles()
You cannot instantiate this class.

Method Detail

encrypt

public static void encrypt(String plainFilePath,
                           String raesFilePath)
                    throws IOException
Encrypts the given plain file to the given RAES file. This version uses the default ArchiveDetector to detect any archive files in its parent directory path except the files themselves, which are not recognized as archive files.

Throws:
IOException

encrypt

public static void encrypt(String plainFilePath,
                           String raesFilePath,
                           ArchiveDetector detector)
                    throws IOException
Encrypts the given plain file to the given RAES file, using the provided ArchiveDetector to detect any archive files in its parent directory path except the files themselves, which are not recognized as archive files.

Throws:
IOException

decrypt

public static void decrypt(String raesFilePath,
                           String plainFilePath,
                           boolean strongAuthentication)
                    throws IOException
Decrypts the given RAES file to the given plain file. This version uses the default ArchiveDetector to detect any archive files in its parent directory path except the files themselves, which are not recognized as archive files.

Throws:
IOException

decrypt

public static void decrypt(String raesFilePath,
                           String plainFilePath,
                           boolean strongAuthentication,
                           ArchiveDetector detector)
                    throws IOException
Decrypts the given RAES file to the given plain file, using the provided ArchiveDetector to detect any archvie files in its parent directory path except the files themselves, which are not recognized as archive files.

Parameters:
strongAuthentication - If this is true, the whole contents of encrypted file get authenticated, which can be a time consuming operation. Otherwise, only the key/password and the file length get authenticated.
Throws:
IOException