@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) public final class KeyManagement extends Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
KeyManagement.SimpleKeyManagerService |
private static class |
KeyManagement.SimpleKeyProvider |
private static class |
KeyManagement.SimpleKeyProviderFactory |
private static class |
KeyManagement.SimpleView |
| Modifier | Constructor and Description |
|---|---|
private |
KeyManagement()
You cannot instantiate this class.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
setAllPasswords1(char[] password)
Sets the password for all RAES encrypted ZIP files.
|
static void |
setAllPasswords2(char[] password)
Sets the password for all RAES encrypted ZIP files.
|
static void |
setPassword(TFile file,
char[] password)
Sets the password for an individual RAES encrypted ZIP file.
|
public static void setPassword(TFile file, char[] password)
KeyManager for
AesCipherParameters and the default KeyProvider for the
given file in order to set the given password.
As another side effect, the key strength of the
AesCipherParameters is set to the maximum 256 bits.
This method makes a protective copy of the given password char array. It's highly recommended to overwrite this array with any non-password data after calling this method.
file - the TZP archive file to set the password for.password - the password char array to be copied for subsequent use.public static void setAllPasswords1(char[] password)
TFile.setDefaultArchiveDetector(de.schlichtherle.truezip.file.TArchiveDetector).
This will affect only subsequently created TFile objects!
This method decorates TArchiveDetector.ALL with a
custom archive driver for the canonical archive file suffixes
"tzp|zip.rae|zip.raes" and installs the result as the
default archive detector using TFile.setDefaultArchiveDetector(de.schlichtherle.truezip.file.TArchiveDetector).
The custom archive driver uses a custom KeyManagement.SimpleView implementation for
its PromptingKeyManagerService.
The key strength for all archive files
AesCipherParameters is set to the maximum 256 bits.
This method makes a protective copy of the given password char array. It's highly recommended to overwrite this array with any non-password data after calling this method.
password - the password char array to be copied for subsequent use.public static void setAllPasswords2(char[] password)
TFile.setDefaultArchiveDetector(de.schlichtherle.truezip.file.TArchiveDetector).
This will affect only subsequently created TFile objects!
This method decorates TArchiveDetector.ALL with a
custom archive driver for the canonical archive file suffixes
"tzp|zip.rae|zip.raes" and installs the result as the
default archive detector using TFile.setDefaultArchiveDetector(de.schlichtherle.truezip.file.TArchiveDetector).
The custom archive driver uses a custom implementation of a
KeyManager which requires considerably more code than the
approach used in setAllPasswords1(char[]).
As another side effect, the key strength of the
AesCipherParameters is set to the maximum 256 bits.
This method makes a protective copy of the given password char array. It's highly recommended to overwrite this array with any non-password data after calling this method.
password - the password char array to be copied for subsequent use.Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.