• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2023 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //      http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15 ////////////////////////////////////////////////////////////////////////////////
16 
17 package com.google.crypto.tink.daead;
18 
19 import static com.google.crypto.tink.internal.TinkBugException.exceptionIsBug;
20 
21 /**
22  * Pre-generated {@link KeyTemplate} for {@link com.google.crypto.tink.DeterministicAead} keys.
23  *
24  * <p>Note: if you want to keep dependencies small, consider inlining the constants here.
25  */
26 public final class PredefinedDeterministicAeadParameters {
27   /** A {@code KeyTemplate} that generates new instances of {@code AesSivKey} with a 64-byte key. */
28   public static final AesSivParameters AES256_SIV =
29       exceptionIsBug(
30           () ->
31               AesSivParameters.builder()
32                   .setKeySizeBytes(64)
33                   .setVariant(AesSivParameters.Variant.TINK)
34                   .build());
35 
PredefinedDeterministicAeadParameters()36   private PredefinedDeterministicAeadParameters() {}
37 }
38