CryptoContext.sign

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

class CryptoContext
int
sign

Parameters

detach bool

true if ostream should be the detached signature; otherwise, false

userid string

private key to use to sign the stream

istream gmime.stream.Stream

input stream

ostream gmime.stream.Stream

output stream

Return Value

Type: int

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

Throws