src/pgp_gpg.h
author Edouard Tisserant
Fri, 03 Apr 2015 15:33:10 +0200
changeset 170 de3f8287972e
parent 74 c94f9b9cb7f2
child 200 06655f7634a6
permissions -rw-r--r--
pgp_..port_key -> pgp_..port_keydata to avoid conflict with netpgp
vb@24
     1
#pragma once
vb@24
     2
vb@24
     3
#include "pEpEngine.h"
vb@24
     4
vb@62
     5
PEP_STATUS pgp_init(PEP_SESSION session, bool in_first);
vb@62
     6
void pgp_release(PEP_SESSION session, bool out_last);
vb@24
     7
vb@24
     8
PEP_STATUS pgp_decrypt_and_verify(
vb@49
     9
        PEP_SESSION session, const char *ctext, size_t csize,
vb@49
    10
        char **ptext, size_t *psize, stringlist_t **keylist
vb@24
    11
    );
vb@24
    12
vb@24
    13
PEP_STATUS pgp_encrypt_and_sign(
vb@49
    14
        PEP_SESSION session, const stringlist_t *keylist, const char *ptext,
vb@49
    15
        size_t psize, char **ctext, size_t *csize
vb@24
    16
    );
vb@24
    17
vb@24
    18
PEP_STATUS pgp_verify_text(
vb@49
    19
        PEP_SESSION session, const char *text, size_t size,
vb@49
    20
        const char *signature, size_t sig_size, stringlist_t **keylist
vb@24
    21
    );
vb@24
    22
vb@24
    23
PEP_STATUS pgp_delete_keypair(PEP_SESSION session, const char *fpr);
vb@24
    24
Edouard@170
    25
PEP_STATUS pgp_export_keydata(
vb@49
    26
        PEP_SESSION session, const char *fpr, char **key_data, size_t *size
vb@24
    27
    );
vb@24
    28
vb@24
    29
PEP_STATUS pgp_find_keys(
vb@49
    30
        PEP_SESSION session, const char *pattern, stringlist_t **keylist
vb@24
    31
    );
vb@24
    32
vb@24
    33
PEP_STATUS pgp_generate_keypair(
vb@49
    34
        PEP_SESSION session, pEp_identity *identity
vb@24
    35
    );
vb@24
    36
vb@24
    37
PEP_STATUS pgp_get_key_rating(
vb@74
    38
        PEP_SESSION session,
vb@74
    39
        const char *fpr,
vb@74
    40
        PEP_comm_type *comm_type
vb@24
    41
    );
vb@24
    42
Edouard@170
    43
PEP_STATUS pgp_import_keydata(PEP_SESSION session, const char *key_data,
vb@49
    44
        size_t size);
vb@24
    45
vb@24
    46
PEP_STATUS pgp_recv_key(PEP_SESSION session, const char *pattern);
vb@24
    47
vb@24
    48
PEP_STATUS pgp_send_key(PEP_SESSION session, const char *pattern);
vb@49
    49