| Server IP : 88.99.149.37 / Your IP : 216.73.216.141 Web Server : nginx/1.31.2 System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64 User : muralimurth ( 1015) PHP Version : 8.4.23 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/include/dovecot/ |
Upload File : |
#ifndef ISTREAM_DECRYPT_H
#define ISTREAM_DECRYPT_H
struct dcrypt_private_key;
struct dcrypt_context_symmetric;
enum decrypt_istream_format {
DECRYPT_FORMAT_V1,
DECRYPT_FORMAT_V2
};
/* Look for a private key for a specified public key digest and set it to
priv_key_r. Returns 1 if ok, 0 if key doesn't exist, -1 on internal error.
Note that the private key will be unreferenced when the istream is
destroyed. If the callback is returning a persistent key, it must reference
the key first. (This is required, because otherwise a key newly created by
the callback couldn't be automatically freed.) */
typedef int
i_stream_decrypt_get_key_callback_t(const char *pubkey_digest,
struct dcrypt_private_key **priv_key_r,
const char **error_r, void *context);
struct istream *
i_stream_create_decrypt(struct istream *input,
struct dcrypt_private_key *priv_key);
/* create stream for reading plain encrypted data with no header or MAC.
do not call dcrypt_ctx_sym_init
*/
struct istream *
i_stream_create_sym_decrypt(struct istream *input,
struct dcrypt_context_symmetric *ctx);
/* Decrypt the istream. When a private key is needed, the callback will be
called. This allows using multiple private keys for different mails. */
struct istream *
i_stream_create_decrypt_callback(struct istream *input,
i_stream_decrypt_get_key_callback_t *callback,
void *context);
enum decrypt_istream_format
i_stream_encrypt_get_format(const struct istream *input);
enum io_stream_encrypt_flags
i_stream_encrypt_get_flags(const struct istream *input);
#endif