public class StreamingAeadWrapper extends Object implements PrimitiveWrapper<StreamingAead,StreamingAead>
The returned primitive works with a keyset (rather than a single key). To encrypt a plaintext,
it uses the primary key in the keyset. To decrypt, the primitive tries the enabled keys from the
keyset to select the right key for decryption. All keys in a keyset of StreamingAead have type
OutputPrefixType.RAW.
| Modifier and Type | Method and Description |
|---|---|
Class<StreamingAead> |
getInputPrimitiveClass()
Returns the primitive class object of the primitive used to create B.
|
Class<StreamingAead> |
getPrimitiveClass()
Returns the primitive class object of the primitive managed.
|
static void |
register() |
StreamingAead |
wrap(PrimitiveSet<StreamingAead> primitives)
Wraps a
PrimitiveSet and returns a single instance. |
public StreamingAead wrap(PrimitiveSet<StreamingAead> primitives) throws GeneralSecurityException
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<StreamingAead,StreamingAead>keysetHandle.GeneralSecurityExceptionpublic Class<StreamingAead> getPrimitiveClass()
PrimitiveWrapperreturn P.class; when implementing a wrapper creating objects
of type P.getPrimitiveClass in interface PrimitiveWrapper<StreamingAead,StreamingAead>public Class<StreamingAead> getInputPrimitiveClass()
PrimitiveWrapperreturn B.class;.getInputPrimitiveClass in interface PrimitiveWrapper<StreamingAead,StreamingAead>public static void register()
throws GeneralSecurityException
GeneralSecurityException