[][src]Function minisign::sign

pub fn sign<R>(
    pk: Option<&PublicKey>,
    sk: &SecretKey,
    data_reader: R,
    prehashed: bool,
    trusted_comment: Option<&str>,
    untrusted_comment: Option<&str>
) -> Result<SignatureBox> where
    R: Read

Compute a signature.


  • pk - an optional public key. If provided, it must be the public key from the original key pair.
  • sk - the secret key
  • data_reader - the source of the data to be signed
  • prehashed - use prehashing. Recommended for large files, enabled by default if the data size exceeds 1 GiB.
  • trusted_comment - overrides the default trusted comment
  • untrusted_comment - overrides the default untrusted comment