Class DeterministicAeadKeyTemplates


  • @Deprecated
    public final class DeterministicAeadKeyTemplates
    extends java.lang.Object
    Deprecated.
    Pre-generated KeyTemplate for DeterministicAead keys.

    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.
    These dependencies all come from static class member variables, which are initialized when the class is loaded. This implies that static analysis and code minimization tools (such as proguard) cannot remove the usages either.

    Instead, we recommend to use KeysetHandle.generateEntryFromParametersName or KeysetHandle.generateEntryFromParameters.

    One can use these templates to generate new Keyset with KeysetHandle. To generate a new keyset that contains a single AesSivKey, one can do:

       DeterministicAeadConfig.register();
       KeysetHandle handle = KeysetHandle.generateNew(DeterministicAeadKeyTemplates.AES256_SIV);
       DeterministicAead daead =
           handle.getPrimitive(RegistryConfiguration.get(), DeterministicAead.class);
     
    Since:
    1.1.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static com.google.crypto.tink.proto.KeyTemplate AES256_SIV
      Deprecated.
      A KeyTemplate that generates new instances of AesSivKey with a 64-byte key.
    • Field Detail

      • AES256_SIV

        public static final com.google.crypto.tink.proto.KeyTemplate AES256_SIV
        Deprecated.
        A KeyTemplate that generates new instances of AesSivKey with a 64-byte key.
    • Method Detail

      • createAesSivKeyTemplate

        public static com.google.crypto.tink.proto.KeyTemplate createAesSivKeyTemplate​(int keySize)
        Deprecated.
        Returns:
        a KeyTemplate containing a AesSivKeyFormat with some specified parameters.