public class HybridEncryptWrapper extends Object implements PrimitiveWrapper<HybridEncrypt,HybridEncrypt>
PrimitiveWrapper<HybridEncrypt>.
The returned 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.
| Modifier and Type | Method and Description |
|---|---|
Class<HybridEncrypt> |
getInputPrimitiveClass()
Returns the primitive class object of the primitive used to create B.
|
Class<HybridEncrypt> |
getPrimitiveClass()
Returns the primitive class object of the primitive managed.
|
static void |
register()
Register the wrapper within the registry.
|
HybridEncrypt |
wrap(PrimitiveSet<HybridEncrypt> primitives)
Wraps a
PrimitiveSet and returns a single instance. |
public HybridEncrypt wrap(PrimitiveSet<HybridEncrypt> primitives)
PrimitiveWrapperPrimitiveSet and returns a single instance.
This method gets called when a new primitive is created. primitiveSet is immutable.
This has to be implemented when a new primitive type is added.
wrap in interface PrimitiveWrapper<HybridEncrypt,HybridEncrypt>public Class<HybridEncrypt> getPrimitiveClass()
PrimitiveWrapperreturn P.class; when implementing a wrapper creating objects
of type P.getPrimitiveClass in interface PrimitiveWrapper<HybridEncrypt,HybridEncrypt>public Class<HybridEncrypt> getInputPrimitiveClass()
PrimitiveWrapperreturn B.class;.getInputPrimitiveClass in interface PrimitiveWrapper<HybridEncrypt,HybridEncrypt>public static void register()
throws GeneralSecurityException
This is required for calls to Keyset.getPrimitive with a HybridEncrypt
argument.
GeneralSecurityException