java_src/src/main/java/com/google/crypto/tink/Registry.java
/**
   * Convenience method for generating a new key for the specified {@code keyTemplate}.
   *
   * <p>It looks up a {@link KeyManager} identified by {@code keyTemplate.type_url}, and calls
   * {@link KeyManager#newKey} with {@code keyTemplate} as the parameter.
   *
   * @return a new key
   */
Convenience method for generating a new key for the specified  keyTemplate.
It looks up a  KeyManager identified by  keyTemplate.type_url, and calls
KeyManager#newKey with  keyTemplate as the parameter.

@return a new key
Convenience method for generating a new key for the specified keyTemplate . It looks up a KeyManager identified by keyTemplate . type_url and calls KeyManager#newKey with keyTemplate as the parameter . @return a new key
public static synchronized MessageLite newKey(
      com.google.crypto.tink.proto.KeyTemplate keyTemplate) throws GeneralSecurityException {
    KeyManager<?> manager = getUntypedKeyManager(keyTemplate.getTypeUrl());
    if (newKeyAllowedMap.get(keyTemplate.getTypeUrl()).booleanValue()) {
      return manager.newKey(keyTemplate.getValue());
    } else {
      throw new GeneralSecurityException(
          "newKey-operation not permitted for key type " + keyTemplate.getTypeUrl());
    }
  }
public static synchronized MessageLite newKey ( com . google . crypto . tink . proto . KeyTemplate keyTemplate ) throws GeneralSecurityException { KeyManager < ? > manager = getUntypedKeyManager ( keyTemplate . getTypeUrl ( ) ) ; if ( newKeyAllowedMap . get ( keyTemplate . getTypeUrl ( ) ) . booleanValue ( ) ) { return manager . newKey ( keyTemplate . getValue ( ) ) ; } else { throw new GeneralSecurityException ( "newKey-operation not permitted for key type " + keyTemplate . getTypeUrl ( ) ) ; } }
Convenience method for generating a new key for the specified {@code keyTemplate}.
Convenience method for generating a new key for the specified { @code keyTemplate } .