TrueZIP Driver ZIP.RAES (TZP) 7.1

de.schlichtherle.truezip.crypto.raes
Interface Type0RaesParameters

All Superinterfaces:
RaesParameters
All Known Implementing Classes:
KeyManagerRaesParameters.Type0

@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class)
public interface Type0RaesParameters
extends RaesParameters

The parameters of this interface are used with RAES type 0 files. Type 0 RAES files use password based encryption according to the specifications in PKCS #5 V2.0 und PKCS #12 V1.0.

Author:
Christian Schlichtherle
See Also:
PKCS #5, PKCS #12

Nested Class Summary
static class Type0RaesParameters.KeyStrength
          Defines the key strength for the AES algorithm.
 
Method Summary
 Type0RaesParameters.KeyStrength getKeyStrength()
          Returns the key strength to use for creating or overwriting the RAES file.
 char[] getReadPassword(boolean invalid)
          Returns the password required to open the RAES type 0 file for reading.
 char[] getWritePassword()
          Returns the password required to create or overwrite the RAES type 0 file.
 void setKeyStrength(Type0RaesParameters.KeyStrength keyStrength)
          Sets the key strength to use for creating or overwriting the RAES file.
 

Method Detail

getWritePassword

char[] getWritePassword()
                        throws RaesKeyException
Returns the password required to create or overwrite the RAES type 0 file.

Returns:
A clone of the char array holding the password to use for creating or overwriting the RAES file.
Throws:
RaesKeyException - If password retrieval has been disabled or cancelled.

getReadPassword

char[] getReadPassword(boolean invalid)
                       throws RaesKeyException
Returns the password required to open the RAES type 0 file for reading. This method is called consecutively until either the returned password is correct or an exception is thrown.

Parameters:
invalid - true iff a previous call to this method resulted in an invalid password.
Returns:
A clone of the char array holding the password to open the RAES file for reading.
Throws:
RaesKeyException - If password retrieval has been disabled or cancelled.

getKeyStrength

Type0RaesParameters.KeyStrength getKeyStrength()
Returns the key strength to use for creating or overwriting the RAES file.

Returns:
The key strength to use for creating or overwriting the RAES file.
Throws:
RuntimeException - if getWritePassword() hasn't been called before and the implementation can't tolerate this.

setKeyStrength

void setKeyStrength(Type0RaesParameters.KeyStrength keyStrength)
Sets the key strength to use for creating or overwriting the RAES file.

Parameters:
keyStrength - the key strength to use for creating or overwriting the RAES file.
Throws:
RuntimeException - if getReadPassword(boolean) hasn't been called before and the implementation can't tolerate this.

TrueZIP Driver ZIP.RAES (TZP) 7.1

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.