public class HybridDecryptWrapper extends Object implements PrimitiveWrapper<HybridDecrypt,HybridDecrypt>
PrimitiveWrapper<HybridDecrypt>.
The returned primitive works with a keyset (rather than a single 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<HybridDecrypt> |
getInputPrimitiveClass()
Returns the primitive class object of the primitive used to create B.
|
Class<HybridDecrypt> |
getPrimitiveClass()
Returns the primitive class object of the primitive managed.
|
static void |
register()
Register the wrapper within the registry.
|
HybridDecrypt |
wrap(PrimitiveSet<HybridDecrypt> primitives)
Wraps a
PrimitiveSet and returns a single instance. |
public HybridDecrypt wrap(PrimitiveSet<HybridDecrypt> 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<HybridDecrypt,HybridDecrypt>public Class<HybridDecrypt> getPrimitiveClass()
PrimitiveWrapperreturn P.class; when implementing a wrapper creating objects
of type P.getPrimitiveClass in interface PrimitiveWrapper<HybridDecrypt,HybridDecrypt>public Class<HybridDecrypt> getInputPrimitiveClass()
PrimitiveWrapperreturn B.class;.getInputPrimitiveClass in interface PrimitiveWrapper<HybridDecrypt,HybridDecrypt>public static void register()
throws GeneralSecurityException
This is required for calls to Keyset.getPrimitive with a HybridDecrypt
argument.
GeneralSecurityException