Package com.google.crypto.tink
Class Config
- java.lang.Object
-
- com.google.crypto.tink.Config
-
public final class Config extends java.lang.ObjectStatic methods for handling of Tink configurations.Configurations, i.e., a collection of key types and their corresponding key managers supported by a specific run-time environment enable control of Tink setup via JSON-formatted config files that determine which key types are supported, and provide a mechanism for deprecation of obsolete/outdated cryptographic schemes (see config.proto for more info).
Usage
RegistryConfig registryConfig = ...; Config.register(registryConfig);- Since:
- 1.0.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.google.crypto.tink.proto.KeyTypeEntrygetTinkKeyTypeEntry(java.lang.String catalogueName, java.lang.String primitiveName, java.lang.String keyProtoName, int keyManagerVersion, boolean newKeyAllowed)Returns aKeyTypeEntryfor Tink key types with the specified properties.static voidregister(com.google.crypto.tink.proto.RegistryConfig config)Tries to register key managers according to the specification inconfig.static voidregisterKeyType(com.google.crypto.tink.proto.KeyTypeEntry entry)Tries to register a key manager according to the specification inentry.
-
-
-
Method Detail
-
getTinkKeyTypeEntry
public static com.google.crypto.tink.proto.KeyTypeEntry getTinkKeyTypeEntry(java.lang.String catalogueName, java.lang.String primitiveName, java.lang.String keyProtoName, int keyManagerVersion, boolean newKeyAllowed)Returns aKeyTypeEntryfor Tink key types with the specified properties.
-
register
public static void register(com.google.crypto.tink.proto.RegistryConfig config) throws java.security.GeneralSecurityExceptionTries to register key managers according to the specification inconfig.- Throws:
java.security.GeneralSecurityException- if cannot register this config with theRegistry. This usually happens when eitherconfigcontains anyKeyTypeEntrythat is already registered or the Registry cannot find anyKeyManagerorCataloguethat can handle the entry. In both cases the error message should show how to resolve it.
-
registerKeyType
public static void registerKeyType(com.google.crypto.tink.proto.KeyTypeEntry entry) throws java.security.GeneralSecurityExceptionTries to register a key manager according to the specification inentry.- Throws:
java.security.GeneralSecurityException- if cannot register this config with theRegistry. This usually happens whenentryis already registered or the Registry cannot find anyKeyManagerorCataloguethat can handle the entry. In both cases the error message should show how to resolve it.
-
-