@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) public final class AesCipherParameters extends Object implements SafeKey<AesCipherParameters>, Cloneable
| Modifier and Type | Field and Description |
|---|---|
private Type0RaesParameters.KeyStrength |
keyStrength |
private char[] |
password |
| Constructor and Description |
|---|
AesCipherParameters() |
| Modifier and Type | Method and Description |
|---|---|
AesCipherParameters |
clone()
Returns a deep clone of this safe key.
|
Type0RaesParameters.KeyStrength |
getKeyStrength()
Returns the AES cipher key strength, which defaults to
Type0RaesParameters.KeyStrength.BITS_256. |
char[] |
getPassword()
Returns a protective copy of the password char array.
|
void |
reset()
Wipes any key data from the heap and resets this safe key to it's
initial state.
|
void |
setKeyFileBytes(byte[] bytes)
Decodes the given byte array to a password char array for subsequent use.
|
void |
setKeyStrength(Type0RaesParameters.KeyStrength keyStrength)
Sets the AES cipher key strength.
|
void |
setPassword(char[] newPW)
Copies the given password char array for subsequent use as the AES
cipher key.
|
private Type0RaesParameters.KeyStrength keyStrength
@CheckForNull private char[] password
public AesCipherParameters clone()
SafeKeyclone in interface SafeKey<AesCipherParameters>clone in class Objectpublic void reset()
SafeKeyreset in interface SafeKey<AesCipherParameters>@Nullable public char[] getPassword()
public void setPassword(@CheckForNull
char[] newPW)
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.
newPW - the password char array to be copied for subsequent use.public void setKeyFileBytes(@CheckForNull
byte[] bytes)
This method makes a protective copy of the given key file byte array. It's highly recommended to overwrite this array with any non-password data after calling this method.
bytes - the byte array to decode.public Type0RaesParameters.KeyStrength getKeyStrength()
Type0RaesParameters.KeyStrength.BITS_256.Type0RaesParameters.KeyStrength.BITS_256.public void setKeyStrength(Type0RaesParameters.KeyStrength keyStrength)
keyStrength - the AES cipher key strength.Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.