Package org.refcodes.forwardsecrecy
Interface CipherVersionFactory<CV extends CipherVersion>
-
- Type Parameters:
CV
- The type of theCipherVersion
to be created.
- All Superinterfaces:
org.refcodes.factory.ContextLookupFactory<CV,java.lang.String,java.lang.String>
- All Known Implementing Classes:
CipherVersionFactoryImpl
public interface CipherVersionFactory<CV extends CipherVersion> extends org.refcodes.factory.ContextLookupFactory<CV,java.lang.String,java.lang.String>
As requirements might arise to useCipherVersion
instances with additional attributes or functionality; theCipherVersionFactory
can be replaced with a custom implementation instantiatingCipherVersion
(sub-)types with the additional required attributes or functionality. Additional attributes might be a validity date useful for housekeeping or management purposes.In case you provide your custom
CipherVersionFactory
implementation, make sure the cipher version (sub-)type you return fits with theCipherVersion
(sub-)type of your customCipherVersionGenerator
. A good approach is to make your customCipherVersionGenerator
make use your customCipherVersionFactory
.See the default implementations
CipherVersionGeneratorImpl
, theAbstractCipherVersionGenerator
and theCipherVersionFactoryImpl
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CV
createInstance(java.lang.String aCipherUid, java.lang.String aCipher)
Factory method to be implemented by subclasses.
-
-
-
Method Detail
-
createInstance
CV createInstance(java.lang.String aCipherUid, java.lang.String aCipher)
Factory method to be implemented by subclasses. Required to create implementation dependentCipherVersion
objects.- Specified by:
createInstance
in interfaceorg.refcodes.factory.ContextLookupFactory<CV extends CipherVersion,java.lang.String,java.lang.String>
- Parameters:
aCipherUid
- The UID for the cipher to be stored in theCipherVersion
aCipher
- The cipher to be stored in theCipherVersion
.- Returns:
- The
CipherVersion
with the cipher UID and the cipher
-
-