java_src/src/main/java/com/google/crypto/tink/Registry.java
/**
   * Convenience method for generating a new {@link KeyData} for the specified {@code template}.
   *
   * <p>It looks up a {@link KeyManager} identified by {@code keyTemplate.type_url}, and calls
   * {@link KeyManager#newKeyData}.
   *
   * <p>This method should be used solely for key management.
   *
   * @return a new {@link KeyData}
   */
Convenience method for generating a new  KeyData for the specified  template.

This method should be used solely for key management.

@return a new  KeyData
Convenience method for generating a new KeyData for the specified template . This method should be used solely for key management . @return a new KeyData
public static synchronized KeyData
      newKeyData(com.google.crypto.tink.proto.KeyTemplate keyTemplate)
      throws GeneralSecurityException {
    KeyManager<?> manager = getUntypedKeyManager(keyTemplate.getTypeUrl());
    if (newKeyAllowedMap.get(keyTemplate.getTypeUrl()).booleanValue()) {
      return manager.newKeyData(keyTemplate.getValue());
    } else {
      throw new GeneralSecurityException(
          "newKey-operation not permitted for key type " + keyTemplate.getTypeUrl());
    }
  }
public static synchronized KeyData newKeyData ( com . google . crypto . tink . proto . KeyTemplate keyTemplate ) throws GeneralSecurityException { KeyManager < ? > manager = getUntypedKeyManager ( keyTemplate . getTypeUrl ( ) ) ; if ( newKeyAllowedMap . get ( keyTemplate . getTypeUrl ( ) ) . booleanValue ( ) ) { return manager . newKeyData ( keyTemplate . getValue ( ) ) ; } else { throw new GeneralSecurityException ( "newKey-operation not permitted for key type " + keyTemplate . getTypeUrl ( ) ) ; } }
Convenience method for generating a new {@link KeyData} for the specified {@code template}.
Convenience method for generating a new { @link KeyData } for the specified { @code template } .