TrueZIP Driver ZIP.RAES (TZP) 7.1

de.schlichtherle.truezip.crypto.raes.param
Class KeyManagerRaesParameters

java.lang.Object
  extended by de.schlichtherle.truezip.crypto.raes.param.KeyManagerRaesParameters
All Implemented Interfaces:
RaesParameters, RaesParametersProvider

@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class)
public final class KeyManagerRaesParameters
extends Object
implements RaesParametersProvider

An adapter which retrieves RaesParameters by using a KeyManager.

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

Author:
Christian Schlichtherle

Nested Class Summary
private  class KeyManagerRaesParameters.Type0
          An adapter which presents the KeyManager's KeyProvider interface as Type0RaesParameters.
 
Field Summary
private  KeyManager<AesCipherParameters> manager
           
private  URI resource
           
 
Constructor Summary
KeyManagerRaesParameters(KeyManager<AesCipherParameters> manager, URI resource)
          Constructs new RAES parameters using the given key manager.
KeyManagerRaesParameters(KeyManagerProvider provider, URI resource)
          Equivalent to new KeyManagerRaesParameters(provider.get(AesCipherParameters.class), resource).
 
Method Summary
<P extends RaesParameters>
P
get(Class<P> type)
          Requests a RaesParameters instance of the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

private final KeyManager<AesCipherParameters> manager

resource

private final URI resource
Constructor Detail

KeyManagerRaesParameters

public KeyManagerRaesParameters(KeyManagerProvider provider,
                                URI resource)
Equivalent to new KeyManagerRaesParameters(provider.get(AesCipherParameters.class), resource).


KeyManagerRaesParameters

public KeyManagerRaesParameters(KeyManager<AesCipherParameters> manager,
                                URI resource)
Constructs new RAES parameters using the given key manager.

Parameters:
resource - the absolute URI of the RAES file.
Throws:
IllegalArgumentException - if resource is not absolute.
Method Detail

get

public <P extends RaesParameters> P get(Class<P> type)
Description copied from interface: RaesParametersProvider
Requests a RaesParameters instance of the given type.

Specified by:
get in interface RaesParametersProvider
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 Driver ZIP.RAES (TZP) 7.1

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