Function hacl::signature::sign

source ยท
pub fn sign<'a>(
    mode: Mode,
    hash: impl Into<Option<Algorithm>>,
    sk: &[u8],
    msg: &[u8],
    nonce: impl Into<Option<&'a Nonce>>,
) -> Result<Vec<u8>, Error>
Expand description

Sign a message msg with the secret key sk and the given signature scheme (mode). For ECDSA the hash algorithm and a nonce have to be passed in as well.