public byte[] calculateSignature(byte[] random, byte[] privateKey, byte[] message) { byte[] result = new byte[64]; if (curve_sigs.curve25519_sign(sha512provider, result, privateKey, message, message.length, random) != 0) { throw new IllegalArgumentException("Message exceeds max length!"); } return result; }