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 get_session_key from a previous
decryption. If the session_key
is not valid, decryption will fail.
If the encrypted input stream was also signed, the returned DecryptResult will have a non-null list of signatures, each with a SignatureStatus (among other details about each signature).
On success, the returned DecryptResult 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.
this | |
flags |
a set of DecryptFlags |
session_key |
the session key to use or null |
istream |
input/ciphertext stream |
ostream |
output/cleartext stream |
a DecryptResult on success or null on error. |