|
TrueZIP Samples 7.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.schlichtherle.truezip.sample.file.RaesFiles
public class RaesFiles
Saves and restores the contents of arbitrary files to and from the RAES file format for encryption and decryption. This class cannot get instantiated outside its package.
Note that this class is not intended to access RAES encrypted ZIP files -
use the TFile class for this task instead.
| Constructor Summary | |
|---|---|
RaesFiles()
|
|
| 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,
TArchiveDetector detector)
Decrypts the given RAES file to the given plain file, using the provided TArchiveDetector 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,
TArchiveDetector detector)
Encrypts the given plain file to the given RAES file, using the provided TArchiveDetector to detect any archive files in its parent directory path except the files themselves, which are not recognized as archive files. |
private static TFile |
newNonArchiveFile(String path,
TArchiveDetector detector)
Creates a file object which uses the provided TArchiveDetector, but does not recognize its own pathname as an archive file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RaesFiles()
| Method Detail |
|---|
public static void encrypt(String plainFilePath,
String raesFilePath)
throws IOException
IOException
public static void encrypt(String plainFilePath,
String raesFilePath,
TArchiveDetector detector)
throws IOException
IOException
public static void decrypt(String raesFilePath,
String plainFilePath,
boolean strongAuthentication)
throws IOException
IOException
public static void decrypt(String raesFilePath,
String plainFilePath,
boolean strongAuthentication,
TArchiveDetector detector)
throws IOException
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.
IOException
private static TFile newNonArchiveFile(String path,
TArchiveDetector detector)
|
TrueZIP Samples 7.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||