vb@39: #pragma once vb@39: vb@37: #ifdef __cplusplus vb@37: extern "C" { vb@37: #endif vb@37: vb@37: #include "transport.h" vb@37: vb@39: vb@39: // encrypt_message() - encrypt message in memory vb@39: // vb@39: // parameters: vb@48: // session (in) session handle vb@48: // src (in) message to encrypt vb@48: // extra (in) extra keys for encryption vb@83: // dst (out) pointer to new encrypted message or NULL on failure vb@83: // format (in) encrypted format vb@39: // vb@39: // return value: vb@48: // PEP_STATUS_OK on success vb@48: // PEP_KEY_NOT_FOUND at least one of the receipient keys vb@48: // could not be found vb@48: // PEP_KEY_HAS_AMBIG_NAME at least one of the receipient keys has vb@48: // an ambiguous name vb@48: // PEP_GET_KEY_FAILED cannot retrieve key vb@83: // vb@83: // caveat: vb@83: // the ownership of the new message goes to the caller vb@38: vb@44: DYNAMIC_API PEP_STATUS encrypt_message( vb@37: PEP_SESSION session, vb@37: const message *src, vb@37: stringlist_t *extra, vb@38: message **dst, vb@81: PEP_enc_format enc_format vb@37: ); vb@37: vb@39: vb@39: // decrypt_message() - decrypt message in memory vb@39: // vb@39: // parameters: vb@48: // session (in) session handle vb@48: // src (in) message to decrypt vb@83: // dst (out) pointer to new decrypted message or NULL on failure vb@83: // format (in) unencrypted format vb@39: // vb@39: // return value: vb@39: // error status or PEP_STATUS_OK on success vb@83: // vb@83: // caveat: vb@83: // the ownership of the new message goes to the caller vb@39: vb@44: DYNAMIC_API PEP_STATUS decrypt_message( vb@37: PEP_SESSION session, vb@37: const message *src, vb@81: message **dst, vb@81: PEP_enc_format enc_format vb@37: ); vb@37: vb@37: #ifdef __cplusplus vb@37: } vb@37: #endif vb@37: