/** * Tries to register key managers according to the specification in {@code config}. * * @throws GeneralSecurityException if cannot register this config with the {@link Registry}. This * usually happens when either {@code config} contains any {@link KeyTypeEntry} that is * already registered or the Registry cannot find any {@link * com.google.crypto.tink.KeyManager} or {@link com.google.crypto.tink.Catalogue} that can * handle the entry. In both cases the error message should show how to resolve it. */ public static void register(RegistryConfig config) throws GeneralSecurityException { for (KeyTypeEntry entry : config.getEntryList()) { registerKeyType(entry); } }