Only seed database for Debian install if we're using default config
[onak.git] / armor.h
1 /*
2  * armor.h - Routines to (de)armor OpenPGP packet streams.
3  *
4  * Jonathan McDowell <noodles@earth.li>
5  *
6  * Copyright 2002 Project Purple
7  */
8
9 #ifndef __ARMOR_H__
10 #define __ARMOR_H__
11
12 #include "keystructs.h"
13
14 /**
15  *      armor_openpgp_stream - Takes a list of OpenPGP packets and armors it.
16  *      @putchar_func: The function to output the next armor character.
17  *      @ctx: The context pointer for putchar_func.
18  *      @packets: The list of packets to output.
19  *
20  *      This function ASCII armors a list of OpenPGP packets and outputs it
21  *      using putchar_func.
22  */
23 int armor_openpgp_stream(int (*putchar_func)(void *ctx, size_t count,
24                                                 unsigned char *c),
25                                 void *ctx,
26                                 struct openpgp_packet_list *packets);
27
28 /**
29  *      dearmor_openpgp_stream - Reads & decodes an ACSII armored OpenPGP msg.
30  *      @getchar_func: The function to get the next character from the stream.
31  *      @ctx: The context pointer for getchar_func.
32  *      @packets: The list of packets.
33  *
34  *      This function uses getchar_func to read characters from an ASCII
35  *      armored OpenPGP stream and outputs the data as a linked list of
36  *      packets.
37  */
38 int dearmor_openpgp_stream(int (*getchar_func)(void *ctx, size_t count,
39                                         unsigned char *c),
40                                 void *ctx,
41                                 struct openpgp_packet_list **packets);
42
43 #endif /* __ARMOR_H__ */