src/message_api.h
author vb
Tue, 30 Dec 2014 13:04:17 +0100
changeset 39 66b5cc6cb987
parent 38 271bea5552dc
child 44 4013b57a6a69
permissions -rw-r--r--
...
     1 #pragma once
     2 
     3 #ifdef __cplusplus
     4 extern "C" {
     5 #endif
     6 
     7 #include "transport.h"
     8 
     9 
    10 // encrypt_message() - encrypt message in memory
    11 //
    12 //  parameters:
    13 //      session             session handle
    14 //      src                 message to encrypt
    15 //      extra               extra keys for encryption
    16 //      dst                 pointer to encrypted message or NULL on failure
    17 //      format              encryption format
    18 //
    19 //  return value:
    20 //      error status or PEP_STATUS_OK on success; PEP_KEY_NOT_FOUND if one
    21 //      or more keys couldn't be found, but the message could be encrypted
    22 //      with other keys
    23 
    24 PEP_STATUS encrypt_message(
    25         PEP_SESSION session,
    26         const message *src,
    27         stringlist_t *extra,
    28         message **dst,
    29         PEP_enc_format format
    30     );
    31 
    32 
    33 // decrypt_message() - decrypt message in memory
    34 //
    35 //  parameters:
    36 //      session             session handle
    37 //      src                 message to decrypt
    38 //      dst                 pointer to decrypted message or NULL on failure
    39 //
    40 //  return value:
    41 //      error status or PEP_STATUS_OK on success
    42 
    43 PEP_STATUS decrypt_message(
    44         PEP_SESSION session,
    45         const message *src,
    46         message **dst
    47     );
    48 
    49 #ifdef __cplusplus
    50 }
    51 #endif
    52