gmime.crypto_context

Module for [CryptoContext] class

Types 3

A crypto context for use with MIME.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
CryptoContext self() nothrowReturns `this`, for use in `with` statements.
CryptoContextGidBuilder builder() static nothrowGet builder for [gmime.crypto_context.CryptoContext] Returns: New builder object
gmime.decrypt_result.DecryptResult decrypt(gmime.types.DecryptFlags flags, string sessionKey, gmime.stream.Stream istream, gmime.stream.Stream ostream)Decrypts the ciphertext input stream and writes the resulting cleartext to the output stream.
gmime.types.DigestAlgo digestId(string name) nothrowGets the digest id based on the digest name.
string digestName(gmime.types.DigestAlgo digest) nothrowGets the digest name based on the digest id digest.
int encrypt(bool sign, string userid, gmime.types.EncryptFlags flags, string[] recipients, gmime.stream.Stream istream, gmime.stream.Stream ostream)Encrypts (and optionally signs) the cleartext input stream and writes the resulting ciphertext to the output stream.
int exportKeys(string[] keys, gmime.stream.Stream ostream)Exports the keys/certificates in keys to the stream ostream from the key/certificate database controlled by ctx.
string getEncryptionProtocol() nothrowGets the encryption protocol for the crypto context. Returns: the encryption protocol or null if not supported.
string getKeyExchangeProtocol() nothrowGets the key exchange protocol for the crypto context. Returns: the key exchange protocol or null if not supported.
string getSignatureProtocol() nothrowGets the signature protocol for the crypto context. Returns: the signature protocol or null if not supported.
int importKeys(gmime.stream.Stream istream)Imports a stream of keys/certificates contained within istream into the key/certificate database controlled by ctx.
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.
gmime.signature_list.SignatureList verify(gmime.types.VerifyFlags flags, gmime.stream.Stream istream, gmime.stream.Stream sigstream = null, gmime.stream.Stream ostream = null)Verifies the signature. If istream is a clearsigned stream, you should pass null as the sigstream parameter and may wish to provide an ostream argument for GMime to output the original plaintext in...
Constructors
this(void * ptr, Flag!"Take" take)
this(string protocol)Creates a new crypto context for the specified protocol.
Methods
CryptoContext build() nothrowCreate object from builder. Returns: New object