Parse PGP data packets. More...
#include <stdio.h>
Go to the source code of this file.
Enumerations | |
enum | PacketTags { PT_RES0 = 0 , PT_ESK , PT_SIG , PT_CESK , PT_OPS , PT_SECKEY , PT_PUBKEY , PT_SUBSECKEY , PT_COMPRESSED , PT_SKE , PT_MARKER , PT_LITERAL , PT_TRUST , PT_NAME , PT_SUBKEY , PT_RES15 , PT_COMMENT } |
PGP packet types. More... | |
Functions | |
unsigned char * | pgp_read_packet (FILE *fp, size_t *len) |
Read a PGP packet from a file. | |
void | pgp_release_packet (void) |
Free the cached PGP packet. | |
Parse PGP data packets.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file pgppacket.h.
enum PacketTags |
PGP packet types.
Definition at line 35 of file pgppacket.h.
unsigned char * pgp_read_packet | ( | FILE * | fp, |
size_t * | len | ||
) |
Read a PGP packet from a file.
[in] | fp | File to read from |
[out] | len | Number of bytes read |
ptr | PGP data packet |
This function uses a cache to store the data: PacketBuf, PacketBufLen.
Definition at line 78 of file pgppacket.c.
void pgp_release_packet | ( | void | ) |
Free the cached PGP packet.
Free the data stored in PacketBuf.
Definition at line 231 of file pgppacket.c.