public static KeyHandle generateNew(KeyTemplate keyTemplate) throws GeneralSecurityException {
    ProtoKey protoKey = new ProtoKey(newKeyData(keyTemplate), getOutputPrefixType(keyTemplate));
    return new KeyHandle(protoKey);
  }
Generates a new {@link KeyHandle} that contains a fresh key generated according to {@code
keyTemplate}.

@throws GeneralSecurityException if the key template's type URL has not been registered with
    the {@link Registry}.
java_src/src/main/java/com/google/crypto/tink/tinkkey/KeyHandle.java