de.schlichtherle.truezip.crypto.raes.param
Class KeyManagerRaesParameters
java.lang.Object
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
manager
private final KeyManager<AesCipherParameters> manager
resource
private final URI resource
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.
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.
Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.