src/pgp_netpgp.h
author Edouard Tisserant
Mon, 20 Apr 2015 23:26:20 +0200
changeset 210 f599bb1ebb90
parent 179 112fadcf74b9
child 226 a2079f2f7a8c
permissions -rw-r--r--
Merged
Edouard@174
     1
#pragma once
Edouard@174
     2
Edouard@174
     3
#include "pEpEngine.h"
Edouard@174
     4
Edouard@174
     5
PEP_STATUS pgp_init(PEP_SESSION session, bool in_first);
Edouard@174
     6
void pgp_release(PEP_SESSION session, bool out_last);
Edouard@174
     7
Edouard@174
     8
PEP_STATUS pgp_decrypt_and_verify(
Edouard@174
     9
        PEP_SESSION session, const char *ctext, size_t csize,
Edouard@174
    10
        char **ptext, size_t *psize, stringlist_t **keylist
Edouard@174
    11
    );
Edouard@174
    12
Edouard@174
    13
PEP_STATUS pgp_encrypt_and_sign(
Edouard@174
    14
        PEP_SESSION session, const stringlist_t *keylist, const char *ptext,
Edouard@174
    15
        size_t psize, char **ctext, size_t *csize
Edouard@174
    16
    );
Edouard@174
    17
Edouard@174
    18
PEP_STATUS pgp_verify_text(
Edouard@174
    19
        PEP_SESSION session, const char *text, size_t size,
Edouard@174
    20
        const char *signature, size_t sig_size, stringlist_t **keylist
Edouard@174
    21
    );
Edouard@174
    22
Edouard@174
    23
PEP_STATUS pgp_delete_keypair(PEP_SESSION session, const char *fpr);
Edouard@174
    24
Edouard@179
    25
PEP_STATUS pgp_export_keydata(
Edouard@174
    26
        PEP_SESSION session, const char *fpr, char **key_data, size_t *size
Edouard@174
    27
    );
Edouard@174
    28
Edouard@174
    29
PEP_STATUS pgp_find_keys(
Edouard@174
    30
        PEP_SESSION session, const char *pattern, stringlist_t **keylist
Edouard@174
    31
    );
Edouard@174
    32
Edouard@174
    33
PEP_STATUS pgp_generate_keypair(
Edouard@174
    34
        PEP_SESSION session, pEp_identity *identity
Edouard@174
    35
    );
Edouard@174
    36
Edouard@174
    37
PEP_STATUS pgp_get_key_rating(
Edouard@174
    38
        PEP_SESSION session,
Edouard@174
    39
        const char *fpr,
Edouard@174
    40
        PEP_comm_type *comm_type
Edouard@174
    41
    );
Edouard@174
    42
Edouard@179
    43
PEP_STATUS pgp_import_keydata(PEP_SESSION session, const char *key_data,
Edouard@174
    44
        size_t size);
Edouard@174
    45
Edouard@174
    46
PEP_STATUS pgp_recv_key(PEP_SESSION session, const char *pattern);
Edouard@174
    47
Edouard@174
    48
PEP_STATUS pgp_send_key(PEP_SESSION session, const char *pattern);
Edouard@174
    49
Edouard@210
    50
PEP_STATUS pgp_renew_key(
Edouard@210
    51
        PEP_SESSION session,
Edouard@210
    52
        const char *fpr,
Edouard@210
    53
        const timestamp *ts
Edouard@210
    54
    );
Edouard@210
    55
Edouard@210
    56
PEP_STATUS pgp_revoke_key(PEP_SESSION session, const char *fpr);