316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi/* Look for a private key for a specified public key digest and set it to
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi priv_key_r. Returns 1 if ok, 0 if key doesn't exist, -1 on internal error. */
269a38b5e60ad8698d6ea56e4a500be2f2486795Aki Tuomii_stream_decrypt_get_key_callback_t(const char *pubkey_digest,
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomii_stream_create_decrypt(struct istream *input, struct dcrypt_private_key *priv_key);
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi/* create stream for reading plain encrypted data with no header or MAC.
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi do not call dcrypt_ctx_sym_init
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomii_stream_create_sym_decrypt(struct istream *input, struct dcrypt_context_symmetric *ctx);
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi/* Decrypt the istream. When a private key is needed, the callback will be
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi called. This allows using multiple private keys for different mails. */
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomii_stream_create_decrypt_callback(struct istream *input,
ebd1c50bc43e08ee0a05ad68c7d48497a1563fabMartti Rannanjärvienum decrypt_istream_format i_stream_encrypt_get_format(const struct istream *input);