public interface PrimitiveWrapper<P>
A PrimitiveSet can be wrapped by a single primitive in order to fulfil a cryptographic task.
This is done by the PrimitiveWrapper. Whenever a new primitive type is added to Tink, the user
should define a new PrimitiveWrapper and register it by calling
com.google.crypto.tink.Registry#registerPrimitiveWrapper.
| Modifier and Type | Method and Description |
|---|---|
Class<P> |
getPrimitiveClass()
Returns the primitive class object of the primitive managed.
|
P |
wrap(PrimitiveSet<P> set)
Wraps a
PrimitiveSet and returns a single instance. |
P wrap(PrimitiveSet<P> set) throws GeneralSecurityException
PrimitiveSet and returns a single instance.
This has to be implemented when a new primitive type is added.GeneralSecurityException