de.schlichtherle.key
Interface AesKeyProvider

All Superinterfaces:
KeyProvider
All Known Implementing Classes:
PromptingAesKeyProvider

public interface AesKeyProvider
extends KeyProvider

A KeyProvider which allows to select the cipher key strength when creating a new AES encrypted resource or replacing the entire contents of an already existing AES encrypted resource. The cipher key strength for the AES encryption may be either 128, 192 or 256 bits.

Since:
TrueZIP 6.1
Version:
TrueZIP 6.7
Author:
Christian Schlichtherle

Field Summary
static int KEY_STRENGTH_128
          Identifier for a 128 bit ciphering key.
static int KEY_STRENGTH_192
          Identifier for a 192 bit ciphering key.
static int KEY_STRENGTH_256
          Identifier for a 256 bit ciphering key.
 
Fields inherited from interface de.schlichtherle.key.KeyProvider
MIN_KEY_RETRY_DELAY
 
Method Summary
 int getKeyStrength()
          Returns the cipher key strength for the AES encryption.
 void setKeyStrength(int keyStrength)
          Sets the cipher key strength for the AES encryption.
 
Methods inherited from interface de.schlichtherle.key.KeyProvider
getCreateKey, getOpenKey, invalidOpenKey
 

Field Detail

KEY_STRENGTH_128

static final int KEY_STRENGTH_128
Identifier for a 128 bit ciphering key.

See Also:
Constant Field Values

KEY_STRENGTH_192

static final int KEY_STRENGTH_192
Identifier for a 192 bit ciphering key.

See Also:
Constant Field Values

KEY_STRENGTH_256

static final int KEY_STRENGTH_256
Identifier for a 256 bit ciphering key.

See Also:
Constant Field Values
Method Detail

getKeyStrength

int getKeyStrength()
Returns the cipher key strength for the AES encryption.

Returns:
One of KEY_STRENGTH_128, KEY_STRENGTH_192 or KEY_STRENGTH_256.

setKeyStrength

void setKeyStrength(int keyStrength)
Sets the cipher key strength for the AES encryption.

Parameters:
keyStrength - One of KEY_STRENGTH_128, KEY_STRENGTH_192 or KEY_STRENGTH_256.
Throws:
IllegalArgumentException - If the preconditions for the parameter do not hold.