SECKEY(3)

NAME
seckey - routines to manipulate secret keys

SYNOPSIS
#include <pgplib.h>
int
buf2seckey(u_char *buf, int len, PGPseckey_t *key);
void
free_seckey(PGPseckey_t *key);
void
print_seckey(int verbose, FILE *fd, PGPseckey_t *key);

DESCRIPTION
The routine buf2seckey() parses the buffer buf, which must contain a PGP secret key, and fills in the relevant parts of the structure pointed to by key. The secret fields in the key are not decrypted. In the same manner as buf2_seckey() does not allocate space for the structure, free_seckey() only frees the internal state (not the space occupied by the structure itself). print_seckey() is for debugging purposes only; use it with the outmost care ! Upon success 0 is returned. If an error occurs, -1 is returned. buf2seckey() will return 1 if there was a syntax error in the input.

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

HISTORY
Written by Tage Stabell-Kulų. First appeared in PGPlib 0.1