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