CryptoContext.sign

int sign(bool detach, string userid, gmime.stream.Stream istream, gmime.stream.Stream ostream)

Signs the input stream and writes the resulting signature to the output stream.

Parameters

detachtrue if ostream should be the detached signature; otherwise, false
useridprivate key to use to sign the stream
istreaminput stream
ostreamoutput stream

Returns

the #GMimeDigestAlgo used on success or %-1 on fail.

Throws

[ErrorWrap]