public abstract class MacKey extends Key
| Constructor and Description |
|---|
MacKey() |
| Modifier and Type | Method and Description |
|---|---|
abstract Bytes |
getOutputPrefix()
Returns a
Bytes instance which is prefixed to every mac tag. |
abstract MacParameters |
getParameters()
Returns the parameters of this key.
|
equalsKey, getIdRequirementOrNullpublic abstract Bytes getOutputPrefix()
Bytes instance which is prefixed to every mac tag.
In order to make key rotation more efficient, Tink allows every Mac key to be prefixed with a sequence of bytes. When verifying a tag, only keys with matching prefix have to be tried.
Note that a priori, the output prefix may not be unique in a keyset (i.e., different keys in a keyset may have the same prefix (or, one prefix may be a prefix of the other). To avoid this, built in Tink keys use the convention that the prefix is either '0x00' or '0x01'. See the Tink keys for details.
public abstract MacParameters getParameters()
getParameters in class Key