public final class Config extends Object
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).
RegistryConfig registryConfig = ...;
Config.register(registryConfig);
| Modifier and Type | Method and Description |
|---|---|
static KeyTypeEntry |
getTinkKeyTypeEntry(String catalogueName,
String primitiveName,
String keyProtoName,
int keyManagerVersion,
boolean newKeyAllowed)
Returns a
KeyTypeEntry for Tink key types with the specified properties. |
static void |
register(RegistryConfig config)
Tries to register key managers according to the specification in
config. |
static void |
registerKeyType(KeyTypeEntry entry)
Tries to register a key manager according to the specification in
entry. |
public static KeyTypeEntry getTinkKeyTypeEntry(String catalogueName, String primitiveName, String keyProtoName, int keyManagerVersion, boolean newKeyAllowed)
KeyTypeEntry for Tink key types with the specified properties.public static void register(RegistryConfig config) throws GeneralSecurityException
config.GeneralSecurityException - if cannot register this config with the Registry. This
usually happens when either config contains any KeyTypeEntry that is
already registered or the Registry cannot find any KeyManager or Catalogue that can
handle the entry. In both cases the error message should show how to resolve it.public static void registerKeyType(KeyTypeEntry entry) throws GeneralSecurityException
entry.GeneralSecurityException - if cannot register this config with the Registry. This
usually happens when entry is already registered or the Registry cannot find any
KeyManager or Catalogue that
can handle the entry. In both cases the error message should show how to resolve it.