TrueZIP 6.8

de.schlichtherle.crypto.io.raes
Class KeyManagerRaesParameters

java.lang.Object
  extended by de.schlichtherle.crypto.io.raes.KeyManagerRaesParameters
All Implemented Interfaces:
RaesParameters, RaesParametersAgent

public class KeyManagerRaesParameters
extends Object
implements RaesParametersAgent

A facade which retrieves RaesParameters by using the KeyManager. The KeyManager usually prompts the user via a pluggable user interface.

According to the current state of RAES, only password based encryption is supported. The facade pattern allows this class to be changed to support other encryption and authentication schemes in the future without requiring to change the client code.

Implementation note: Of course this class could implement Type0RaesParameters directly. But then this interface and all its methods would be public. However, it is anticipated that with the advent of additional parameter interfaces for new RAES types, the explicit implementation of interfaces would limit this classes ability to implement preferences for certain RAES types. Now, implementing the RaesParametersAgent interface allows us to control the search for suitable RAES parameters according to the user's preferences, whereas any direct implementation of these interfaces would put us at the mercy of RaesOutputStream!

Since:
TrueZIP 6.0
Version:
$Id: KeyManagerRaesParameters.java,v 1.4 2010/08/20 13:09:38 christian_schlichtherle Exp $
Author:
Christian Schlichtherle

Constructor Summary
KeyManagerRaesParameters(String cPath)
          Constructs a new set of default RAES parameters.
 
Method Summary
 RaesParameters getParameters(Class type)
          Requests an RaesParameters instance of the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyManagerRaesParameters

public KeyManagerRaesParameters(String cPath)
Constructs a new set of default RAES parameters.

Parameters:
cPath - The canonical pathname of the RAES file - null is not allowed!
Method Detail

getParameters

public RaesParameters getParameters(Class type)
Description copied from interface: RaesParametersAgent
Requests an RaesParameters instance of the given type. It is permissible to return an instance of any other implementation of the RaesParameters interface. If the returned object is an instance of an implementation of this interface, it will be used to continue the search for RAES parameters recursively. Otherwise the search will be aborted.

Specified by:
getParameters in interface RaesParametersAgent
Parameters:
type - The RaesParameters interface class which's implementation is searched.
Returns:
An instance of RaesParameters or null if no RAES parameters are available.

TrueZIP 6.8

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