Skip to main content

crypto_sign_open

Function crypto_sign_open 

Source
pub fn crypto_sign_open(
    message: &mut [u8],
    signed_message: &[u8],
    public_key: &PublicKey,
) -> Result<(), Error>
Expand description

Verifies the signature of signed_message, placing the result into message. The length of message should be the length of the signed message minus CRYPTO_SIGN_BYTES.

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

§Errors

Returns an error if signed_message is too short, message has the wrong length, or the signature or public key is invalid.