PKE(3)

NAME
pke - routines to manipulate packets encrypted with a public key

SYNOPSIS
#include <pgplib.h>
int
buf2pke(u_char *buf, int len, PGPpke_t *pke);
void
free_pke(PGPpke_t *pke);

DESCRIPTION
The routine buf2pke() parses the buffer buf, which must contain a PGP PKE packet, and fills in the relevant parts in the structure pointed to by pke. In the same manner as buf2pke() does not allocate space for the structure, free_pke() only frees the internal state (not the space occupied by the structure itself).

RETURN VALUES
Upon success 0 is returned. If an error occurs, -1 is returned. buf2pke() will return 1 if there was a syntax error in the input.

SEE ALSO
malloc(3) free(3) PGPlib(3)

HISTORY
Written by Thomas Roessler <roessler@guug.de>. First appeared in PGPlib 0.3.