Function ntrumls::sign [] [src]

pub fn sign(
    private_key: &PrivateKey,
    public_key: &PublicKey,
    message: &[u8]
) -> Option<Box<[u8]>>

Signs a message

This function signs a message using the public and private key pair. It will return an optional boxed byte array, with the signed message. If something goes wrong, None will be returned. Example:

let mut message = b"Hello from NTRUMLS!";
let signature = ntrumls::sign(&private_key, &public_key, message).unwrap();