public class ChunkedMacWrapper extends Object implements PrimitiveWrapper<ChunkedMac,ChunkedMac>
The returned primitive works with a keyset (rather than a single key). To compute a MAC tag,
it uses the primary key in the keyset, and prepends to the tag a certain prefix associated with
the primary key. To verify a tag, the primitive uses the prefix of the tag to efficiently select
the right key in the set. If the keys associated with the prefix do not validate the tag, the
primitive tries all keys with OutputPrefixType.RAW.
| Modifier and Type | Method and Description |
|---|---|
Class<ChunkedMac> |
getInputPrimitiveClass()
Returns the primitive class object of the primitive used to create B.
|
Class<ChunkedMac> |
getPrimitiveClass()
Returns the primitive class object of the primitive managed.
|
ChunkedMac |
wrap(PrimitiveSet<ChunkedMac> primitives)
Wraps a
PrimitiveSet and returns a single instance. |
public ChunkedMac wrap(PrimitiveSet<ChunkedMac> 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<ChunkedMac,ChunkedMac>GeneralSecurityExceptionpublic Class<ChunkedMac> getPrimitiveClass()
PrimitiveWrapperreturn P.class; when implementing a wrapper creating objects
of type P.getPrimitiveClass in interface PrimitiveWrapper<ChunkedMac,ChunkedMac>public Class<ChunkedMac> getInputPrimitiveClass()
PrimitiveWrapperreturn B.class;.getInputPrimitiveClass in interface PrimitiveWrapper<ChunkedMac,ChunkedMac>