public class DeterministicAeadWrapper extends Object implements PrimitiveWrapper<DeterministicAead>
PrimitiveWrapper<DeterministicAead>.
The created primitive works with a keyset (rather than a single key). To encrypt a plaintext,
it uses the primary key in the keyset, and prepends to the ciphertext a certain prefix associated
with the primary key. To decrypt, the primitive uses the prefix of the ciphertext to efficiently
select the right key in the set. If the keys associated with the prefix do not work, the
primitive tries all keys with OutputPrefixType.RAW.
| Modifier and Type | Method and Description |
|---|---|
Class<DeterministicAead> |
getPrimitiveClass()
Returns the primitive class object of the primitive managed.
|
static void |
register() |
DeterministicAead |
wrap(PrimitiveSet<DeterministicAead> primitives)
Wraps a
PrimitiveSet and returns a single instance. |
public DeterministicAead wrap(PrimitiveSet<DeterministicAead> primitives)
PrimitiveWrapperPrimitiveSet and returns a single instance.
This has to be implemented when a new primitive type is added.wrap in interface PrimitiveWrapper<DeterministicAead>public Class<DeterministicAead> getPrimitiveClass()
PrimitiveWrapperreturn P.class; when implementing a key manager for
primitive {$code P}.getPrimitiveClass in interface PrimitiveWrapper<DeterministicAead>public static void register()
throws GeneralSecurityException
GeneralSecurityException