@Alpha public final class HmacParameters extends MacParameters
HmacKey.
This API is annotated with Alpha because it is not yet stable and might be changed in the future.
| Modifier and Type | Class and Description |
|---|---|
static class |
HmacParameters.Builder
Builds a new HmacParameters instance.
|
static class |
HmacParameters.HashType
The Hash algorithm used.
|
static class |
HmacParameters.Variant
Describes details of the mac computation.
|
| Modifier and Type | Method and Description |
|---|---|
static HmacParameters.Builder |
builder() |
boolean |
equals(Object o) |
int |
getCryptographicTagSizeBytes()
Returns the size of the tag which is computed cryptographically from the message.
|
HmacParameters.HashType |
getHashType()
Returns a hash type object.
|
int |
getKeySizeBytes() |
int |
getTotalTagSizeBytes()
Returns the size of the security relevant tag plus the size of the prefix with which this key
prefixes every tag.
|
HmacParameters.Variant |
getVariant()
Returns a variant object.
|
int |
hashCode() |
boolean |
hasIdRequirement()
Returns true if a key created with the parameters in this object has to have a certain ID when
it is in a keyset.
|
String |
toString() |
public static HmacParameters.Builder builder()
public int getKeySizeBytes()
public int getCryptographicTagSizeBytes()
This may differ from the total size of the tag, as for some keys, Tink prefixes the tag with a key dependent output prefix.
public int getTotalTagSizeBytes()
public HmacParameters.Variant getVariant()
public HmacParameters.HashType getHashType()
public boolean hasIdRequirement()
ParametersIn Tink, certain keys change their behavior depending on the key id (for example, an Aead object can prefix the ciphertext with the big endian encoding of the key id). If this is
the case, such a key should require a unique id in Key.getIdRequirementOrNull() and
return true here.
hasIdRequirement in class Parameters