3 * @brief Routines to (de)armor OpenPGP packet streams.
5 * Copyright 2002-2004, 2011 Jonathan McDowell <noodles@earth.li>
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the Free
9 * Software Foundation; version 2 of the License.
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * You should have received a copy of the GNU General Public License along with
17 * this program. If not, see <https://www.gnu.org/licenses/>.
23 #include "keystructs.h"
26 * @brief Takes a list of OpenPGP packets and armors it.
27 * @param putchar_func The function to output the next armor character.
28 * @param ctx The context pointer for putchar_func.
29 * @param packets The list of packets to output.
31 * This function ASCII armors a list of OpenPGP packets and outputs it
34 int armor_openpgp_stream(size_t (*putchar_func)(void *ctx, size_t count,
37 struct openpgp_packet_list *packets);
40 * @brief Reads & decodes an ACSII armored OpenPGP msg.
41 * @param getchar_func The function to get the next character from the stream.
42 * @param ctx The context pointer for getchar_func.
43 * @param packets The list of packets.
45 * This function uses getchar_func to read characters from an ASCII
46 * armored OpenPGP stream and outputs the data as a linked list of
49 int dearmor_openpgp_stream(size_t (*getchar_func)(void *ctx, size_t count,
52 struct openpgp_packet_list **packets);
54 #endif /* __ARMOR_H__ */