2 * armor.h - Routines to (de)armor OpenPGP packet streams.
4 * Jonathan McDowell <noodles@earth.li>
6 * Copyright 2002 Project Purple
12 #include "keystructs.h"
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.
20 * This function ASCII armors a list of OpenPGP packets and outputs it
23 int armor_openpgp_stream(int (*putchar_func)(void *ctx, unsigned char c),
25 struct openpgp_packet_list *packets);
28 * dearmor_openpgp_stream - Reads & decodes an ACSII armored OpenPGP msg.
29 * @getchar_func: The function to get the next character from the stream.
30 * @ctx: The context pointer for getchar_func.
31 * @packets: The list of packets.
33 * This function uses getchar_func to read characters from an ASCII
34 * armored OpenPGP stream and outputs the data as a linked list of
37 int dearmor_openpgp_stream(int (*getchar_func)(void *ctx, unsigned char *c),
39 struct openpgp_packet_list **packets);
41 #endif /* __ARMOR_H__ */