src/cryptotech.h
changeset 23 dba569e54163
child 24 50887c6ab78f
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/cryptotech.h	Mon Sep 01 13:02:23 2014 +0200
     1.3 @@ -0,0 +1,37 @@
     1.4 +#pragma once
     1.5 +
     1.6 +#include "pEpEngine.h"
     1.7 +
     1.8 +typedef enum _PEP_cryptotech {
     1.9 +    PEP_crypt_none = 0,
    1.10 +    PEP_crypt_OpenPGP = 0x2f,
    1.11 +//    PEP_ctypt_PEP = 0x6f,
    1.12 +//    PEP_crypt_SMIME = 0x10,
    1.13 +//    PEP_crypt_CMS = 0x20,
    1.14 +
    1.15 +    PEP_crypt__count
    1.16 +};
    1.17 +
    1.18 +typedef PEP_STATUS (*decrypt_and_verify_t)(
    1.19 +    PEP_SESSION session, const char *ctext, size_t csize,
    1.20 +    char **ptext, size_t *psize, stringlist_t **keylist
    1.21 +    );
    1.22 +
    1.23 +typedef PEP_STATUS (*verify_text_t)(
    1.24 +    PEP_SESSION session, const char *text, size_t size,
    1.25 +    const char *signature, size_t sig_size, stringlist_t **keylist
    1.26 +    );
    1.27 +
    1.28 +typedef PEP_STATUS (*encrypt_and_sign_t)(
    1.29 +    PEP_SESSION session, const stringlist_t *keylist, const char *ptext,
    1.30 +    size_t psize, char **ctext, size_t *csize
    1.31 +    );
    1.32 +
    1.33 +typedef struct _PEP_cryptotech_t {
    1.34 +    uint8_t id;
    1.35 +    decrypt_and_verify_t decrypt_and_verify;
    1.36 +    verify_text_t verify_text;
    1.37 +    encrypt_and_sign_t encrypt_and_sign;
    1.38 +} PEP_cryptotech_t;
    1.39 +
    1.40 +typedef uint64_t cryptotech_mask;