[−][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.
Arguments
pk
- an optional public key. If provided, it must be the public key from the original key pair.sk
- the secret keydata_reader
- the source of the data to be signedprehashed
- use prehashing. Recommended for large files, enabled by default if the data size exceeds 1 GiB.trusted_comment
- overrides the default trusted commentuntrusted_comment
- overrides the default untrusted comment