src/message_api.h
author vb
Sun, 08 Feb 2015 11:33:04 -0500
changeset 48 9ff5d2dfa75a
parent 44 4013b57a6a69
child 81 044ce1c7fc9c
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 (in)        session handle
    14 //      src (in)            message to encrypt
    15 //      extra (in)          extra keys for encryption
    16 //      dst (out)           pointer to encrypted message or NULL on failure
    17 //      format (in)         encryption format
    18 //
    19 //  return value:
    20 //      PEP_STATUS_OK                   on success
    21 //		PEP_KEY_NOT_FOUND	            at least one of the receipient keys
    22 //		                                could not be found
    23 //		PEP_KEY_HAS_AMBIG_NAME          at least one of the receipient keys has
    24 //		                                an ambiguous name
    25 //		PEP_GET_KEY_FAILED		        cannot retrieve key
    26 
    27 DYNAMIC_API PEP_STATUS encrypt_message(
    28         PEP_SESSION session,
    29         const message *src,
    30         stringlist_t *extra,
    31         message **dst,
    32         PEP_enc_format format
    33     );
    34 
    35 
    36 // decrypt_message() - decrypt message in memory
    37 //
    38 //  parameters:
    39 //      session (in)        session handle
    40 //      src (in)            message to decrypt
    41 //      dst (out)           pointer to decrypted message or NULL on failure
    42 //
    43 //  return value:
    44 //      error status or PEP_STATUS_OK on success
    45 
    46 DYNAMIC_API PEP_STATUS decrypt_message(
    47         PEP_SESSION session,
    48         const message *src,
    49         message **dst
    50     );
    51 
    52 #ifdef __cplusplus
    53 }
    54 #endif
    55