Package com.google.crypto.tink.mac
Class HmacKeyManager
- java.lang.Object
-
- com.google.crypto.tink.mac.HmacKeyManager
-
public final class HmacKeyManager extends java.lang.ObjectThis key manager generates newHmacKeykeys and produces new instances ofPrfHmacJce.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static KeyTemplatehmacSha256HalfDigestTemplate()static KeyTemplatehmacSha256Template()static KeyTemplatehmacSha512HalfDigestTemplate()static KeyTemplatehmacSha512Template()static voidregister(boolean newKeyAllowed)
-
-
-
Method Detail
-
register
public static void register(boolean newKeyAllowed) throws java.security.GeneralSecurityException- Throws:
java.security.GeneralSecurityException
-
hmacSha256HalfDigestTemplate
public static final KeyTemplate hmacSha256HalfDigestTemplate()
- Returns:
- A
KeyTemplatethat generates new instances of HMAC keys with the following parameters:- Key size: 32 bytes
- Tag size: 16 bytes
- Hash function: SHA256
- Prefix type:
KeyTemplate.OutputPrefixType.TINK
-
hmacSha256Template
public static final KeyTemplate hmacSha256Template()
- Returns:
- A
KeyTemplatethat generates new instances of HMAC keys with the following parameters:- Key size: 32 bytes
- Tag size: 32 bytes
- Hash function: SHA256
- Prefix type:
KeyTemplate.OutputPrefixType.TINK
-
hmacSha512HalfDigestTemplate
public static final KeyTemplate hmacSha512HalfDigestTemplate()
- Returns:
- A
KeyTemplatethat generates new instances of HMAC keys with the following parameters:- Key size: 64 bytes
- Tag size: 32 bytes
- Hash function: SHA512
- Prefix type:
KeyTemplate.OutputPrefixType.TINK
-
hmacSha512Template
public static final KeyTemplate hmacSha512Template()
- Returns:
- A
KeyTemplatethat generates new instances of HMAC keys with the following parameters:- Key size: 64 bytes
- Tag size: 64 bytes
- Hash function: SHA512
- Prefix type:
KeyTemplate.OutputPrefixType.TINK
-
-