@AccessesPartialKey
  public static PublicKeySign create(Ed25519PrivateKey key) throws GeneralSecurityException {
    return new Ed25519Sign(
        key.getPrivateKeyBytes().toByteArray(InsecureSecretKeyAccess.get()),
        key.getOutputPrefix().toByteArray(),
        key.getParameters().getVariant().equals(Ed25519Parameters.Variant.LEGACY)
            ? new byte[] {0}
            : new byte[0]);
  }
Ed25519 signing.

<h3>Usage</h3>

<pre>{@code
Ed25519Sign.KeyPair keyPair = Ed25519Sign.KeyPair.newKeyPair();
// securely store keyPair and share keyPair.getPublicKey()
Ed25519Sign signer = new Ed25519Sign(keyPair.getPrivateKey());
byte[] signature = signer.sign(message);
}</pre>

@since 1.1.0
java_src/src/main/java/com/google/crypto/tink/subtle/Ed25519Sign.java