private static MutableKeyCreationRegistry newRegistryWithLegacyFallback() {
    MutableKeyCreationRegistry registry = new MutableKeyCreationRegistry();
    try {
      registry.add(LEGACY_PROTO_KEY_CREATOR, LegacyProtoParameters.class);
    } catch (GeneralSecurityException e) {
      throw new IllegalStateException("unexpected error.", e);
    }
    return registry;
  }
A class to create key objects from parameters with given randomness.
java_src/src/main/java/com/google/crypto/tink/internal/MutableKeyCreationRegistry.java