Package com.google.crypto.tink.mac
Class MacKeyTemplates
- java.lang.Object
-
- com.google.crypto.tink.mac.MacKeyTemplates
-
@Deprecated public final class MacKeyTemplates extends java.lang.ObjectDeprecated.Use PredefinedMacParameters instead.Pre-generatedKeyTemplateforMac.We recommend to avoid this class in order to keep dependencies small.
- Using this class adds a dependency on protobuf. We hope that eventually it is possible to use Tink without a dependency on protobuf.
- Using this class adds a dependency on classes for all involved key types.
Instead, we recommend to use
KeysetHandle.generateEntryFromParametersNameorKeysetHandle.generateEntryFromParameters.One can use these templates to generate new
KeysetwithKeysetHandle. To generate a new keyset that contains a singleHmacKey, one can do:MacConfig.register(); KeysetHandle handle = KeysetHandle.generateNew(MacKeyTemplates.HMAC_SHA256_128BITTAG); Mac mac = handle.getPrimitive(RegistryConfiguration.get(), Mac.class);- Since:
- 1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static com.google.crypto.tink.proto.KeyTemplateAES_CMACDeprecated.AKeyTemplatethat generates new instances ofcom.google.crypto.tink.proto.CmacKeywith the following parameters: Key size: 32 bytes Tag size: 16 bytes OutputPrefixType: TINKstatic com.google.crypto.tink.proto.KeyTemplateHMAC_SHA256_128BITTAGDeprecated.AKeyTemplatethat generates new instances ofHmacKeywith the following parameters: Key size: 32 bytes Tag size: 16 bytes Hash function: SHA256 OutputPrefixType: TINKstatic com.google.crypto.tink.proto.KeyTemplateHMAC_SHA256_256BITTAGDeprecated.AKeyTemplatethat generates new instances ofHmacKeywith the following parameters: Key size: 32 bytes Tag size: 32 bytes Hash function: SHA256 OutputPrefixType: TINKstatic com.google.crypto.tink.proto.KeyTemplateHMAC_SHA512_256BITTAGDeprecated.AKeyTemplatethat generates new instances ofHmacKeywith the following parameters: Key size: 64 bytes Tag size: 32 bytes Hash function: SHA512 OutputPrefixType: TINKstatic com.google.crypto.tink.proto.KeyTemplateHMAC_SHA512_512BITTAGDeprecated.AKeyTemplatethat generates new instances ofHmacKeywith the following parameters: Key size: 64 bytes Tag size: 64 bytes Hash function: SHA512 OutputPrefixType: TINK
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static com.google.crypto.tink.proto.KeyTemplatecreateHmacKeyTemplate(int keySize, int tagSize, com.google.crypto.tink.proto.HashType hashType)Deprecated.
-
-
-
Field Detail
-
HMAC_SHA256_128BITTAG
public static final com.google.crypto.tink.proto.KeyTemplate HMAC_SHA256_128BITTAG
Deprecated.AKeyTemplatethat generates new instances ofHmacKeywith the following parameters:- Key size: 32 bytes
- Tag size: 16 bytes
- Hash function: SHA256
- OutputPrefixType: TINK
-
HMAC_SHA256_256BITTAG
public static final com.google.crypto.tink.proto.KeyTemplate HMAC_SHA256_256BITTAG
Deprecated.AKeyTemplatethat generates new instances ofHmacKeywith the following parameters:- Key size: 32 bytes
- Tag size: 32 bytes
- Hash function: SHA256
- OutputPrefixType: TINK
-
HMAC_SHA512_256BITTAG
public static final com.google.crypto.tink.proto.KeyTemplate HMAC_SHA512_256BITTAG
Deprecated.AKeyTemplatethat generates new instances ofHmacKeywith the following parameters:- Key size: 64 bytes
- Tag size: 32 bytes
- Hash function: SHA512
- OutputPrefixType: TINK
-
HMAC_SHA512_512BITTAG
public static final com.google.crypto.tink.proto.KeyTemplate HMAC_SHA512_512BITTAG
Deprecated.AKeyTemplatethat generates new instances ofHmacKeywith the following parameters:- Key size: 64 bytes
- Tag size: 64 bytes
- Hash function: SHA512
- OutputPrefixType: TINK
-
AES_CMAC
public static final com.google.crypto.tink.proto.KeyTemplate AES_CMAC
Deprecated.AKeyTemplatethat generates new instances ofcom.google.crypto.tink.proto.CmacKeywith the following parameters:- Key size: 32 bytes
- Tag size: 16 bytes
- OutputPrefixType: TINK
-
-