• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 Google Inc.
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 package com.google.crypto.tink.hybrid;
17 
18 import com.google.crypto.tink.Config;
19 import java.security.GeneralSecurityException;
20 
21 /**
22  * Static methods for registering with the {@link Registry} all instances of {@link
23  * com.google.crypto.tink.HybridEncrypt} key types supported in a particular release of Tink.
24  *
25  * <p>To register all HybridEncrypt key types provided in Tink release 1.0.0 one can do:
26  *
27  * <pre>{@code
28  * Config.register(HybridEncryptConfig.TINK_1_0_0);
29  * }</pre>
30  *
31  * <p>For more information on how to obtain and use instances of HybridEncrypt, see {@link
32  * HybridEncryptFactory}.
33  *
34  * @deprecated use {@link Config} and {@link HybridConfig}
35  */
36 @Deprecated
37 public final class HybridEncryptConfig {
38   /**
39    * Registers standard with the {@code Registry} all HybridEncrypt key types released with the
40    * latest version of Tink.
41    *
42    * <p>Deprecated-yet-still-supported key types are registered in so-called "no new key"-mode,
43    * which allows for usage of existing keys forbids generation of new key material.
44    *
45    * @deprecated use {@link Config#register}
46    */
47   @Deprecated
registerStandardKeyTypes()48   public static void registerStandardKeyTypes() throws GeneralSecurityException {
49     Config.register(HybridConfig.TINK_1_0_0);
50   }
51 
HybridEncryptConfig()52   private HybridEncryptConfig() {}
53 }
54