@Deprecated
  public static synchronized MessageLite newKey(String typeUrl, MessageLite format)
      throws GeneralSecurityException {
    KeyManager<?> manager = getUntypedKeyManager(typeUrl);
    if (KeyManagerRegistry.globalInstance().isNewKeyAllowed(typeUrl)) {
      return manager.newKey(format);
    } else {
      throw new GeneralSecurityException("newKey-operation not permitted for key type " + typeUrl);
    }
  }
Generates a new key for the specified {@code format}.

<p>It looks up a {@link KeyManager} identified by {@code keyTemplate.type_url}, and calls
{@link KeyManager#newKey} with {@code format} as the parameter.

@return a new key
@deprecated Use {@code newKeyData} instead.
java_src/src/main/java/com/google/crypto/tink/Registry.java