Skip to main content

crypto_sign

Function crypto_sign 

Source
pub fn crypto_sign(
    signed_message: &mut [u8],
    message: &[u8],
    secret_key: &SecretKey,
) -> Result<(), Error>
Expand description

Signs message, placing the result into signed_message. The length of signed_message should be the length of the message plus CRYPTO_SIGN_BYTES.

This function is compatible with libsodium’s crypto_sign; the ED25519_NONDETERMINISTIC feature is not supported.

§Errors

Returns an error if signed_message is not exactly one signature longer than message, or signing fails.