pub fn sign<R>(
pk: Option<&PublicKey>,
sk: &SecretKey,
data_reader: R,
trusted_comment: Option<&str>,
untrusted_comment: Option<&str>
) -> Result<SignatureBox>where
R: Read,
Expand description
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 signedtrusted_comment
- overrides the default trusted commentuntrusted_comment
- overrides the default untrusted comment