Decrypts the ciphertext input stream and writes the resulting cleartext to the output stream.
When non-null, session_key should be a null-terminated string, such as the one returned by [gmime.decrypt_result.DecryptResult.getSessionKey] from a previous decryption. If the session_key is not valid, decryption will fail.
If the encrypted input stream was also signed, the returned #GMimeDecryptResult will have a non-null list of signatures, each with a #GMimeSignatureStatus (among other details about each signature).
On success, the returned #GMimeDecryptResult will contain a list of certificates, one for each recipient, that the original encrypted stream was encrypted to.
Note
It
may be possible to maliciously design an encrypted stream such
that recursively decrypting it will result in an endless loop, causing a denial of service attack on your application.
Parameters
flags | a set of #GMimeDecryptFlags |
sessionKey | the session key to use or null |
istream | input/ciphertext stream |
ostream | output/cleartext stream |
Returns
a #GMimeDecryptResult on success or null
on error.