2 * armor.h - Routines to (de)armor OpenPGP packet streams.
4 * Jonathan McDowell <noodles@earth.li>
6 * Copyright 2002 Project Purple
8 * $Id: armor.h,v 1.4 2003/06/04 20:57:07 noodles Exp $
14 #include "keystructs.h"
17 * armor_openpgp_stream - Takes a list of OpenPGP packets and armors it.
18 * @putchar_func: The function to output the next armor character.
19 * @ctx: The context pointer for putchar_func.
20 * @packets: The list of packets to output.
22 * This function ASCII armors a list of OpenPGP packets and outputs it
25 int armor_openpgp_stream(int (*putchar_func)(void *ctx, size_t count,
28 struct openpgp_packet_list *packets);
31 * dearmor_openpgp_stream - Reads & decodes an ACSII armored OpenPGP msg.
32 * @getchar_func: The function to get the next character from the stream.
33 * @ctx: The context pointer for getchar_func.
34 * @packets: The list of packets.
36 * This function uses getchar_func to read characters from an ASCII
37 * armored OpenPGP stream and outputs the data as a linked list of
40 int dearmor_openpgp_stream(int (*getchar_func)(void *ctx, size_t count,
43 struct openpgp_packet_list **packets);
45 #endif /* __ARMOR_H__ */