Package org.refcodes.forwardsecrecy
Interface CipherVersionGenerator<CV extends CipherVersion>
-
- Type Parameters:
CV
- The type of theCipherVersion
to be generated.
- All Superinterfaces:
org.refcodes.generator.Generator<CV>
,java.util.Iterator<CV>
- All Known Subinterfaces:
EncryptionService
- All Known Implementing Classes:
AbstractCipherVersionGenerator
,AbstractEncryptionService
,CipherVersionGeneratorImpl
,LoopbackEncryptionServiceImpl
,PublicKeyEncryptionServiceImpl
public interface CipherVersionGenerator<CV extends CipherVersion> extends org.refcodes.generator.Generator<CV>
Depending on the security demands and performance issues; theGenerator
generatingCipherVersion
instances can be replaced with a customCipherVersionGenerator
using its own approach generating ciphers and cipher UIDs (CipherVersion
instances).In case you provide your custom
CipherVersionGenerator
implementation, make sure theCipherVersion
(sub-)type you return fits with theCipherVersion
(sub-)type of your customCipherVersionFactory
. 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
next()
Generator method to be implemented by subclasses.
-
-
-
Method Detail
-
next
CV next()
Generator method to be implemented by subclasses. Required to create implementation dependent cipher version objects. Retrieves the next valid cipher which may be used for encrypting data.- Specified by:
next
in interfaceorg.refcodes.generator.Generator<CV extends CipherVersion>
- Specified by:
next
in interfacejava.util.Iterator<CV extends CipherVersion>
- Returns:
- The next valid
CipherVersion
for encryption.
-
-