/// <summary> /// Calculates a Curve25519 signature. /// </summary> /// <param name="privateKey">The private Curve25519 key to create the signature with.</param> /// <param name="message">The message to sign.</param> /// <returns>A 64-byte signature.</returns> public byte[] calculateSignature(byte[] privateKey, byte[] message) { if (privateKey == null || privateKey.Length != 32) { throw new ArgumentException("Invalid private key length!"); } byte[] random = provider.getRandom(64); return(calculateSignature(random, privateKey, message)); }
/** * Calculates a Curve25519 signature. * * @param privateKey The private Curve25519 key to create the signature with. * @param message The message to sign. * @return A 64-byte signature. */ public byte[] calculateSignature(byte[] privateKey, byte[] message) { byte[] random = provider.getRandom(64); return(calculateSignature(random, privateKey, message)); }