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, size_t count,
26 struct openpgp_packet_list *packets);
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.
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
38 int dearmor_openpgp_stream(int (*getchar_func)(void *ctx, size_t count,
41 struct openpgp_packet_list **packets);
43 #endif /* __ARMOR_H__ */