FIND_SHORTID(3)

NAME
find_shortid - find a short KeyID

SYNOPSIS
#include <pgplib.h>
int
find_shortid(char *key, PGPKEYID *keyid);

DESCRIPTION
The null terminated string key must be on the form 0[Xx]12345678 (e.g., a 32 bit number (in hex), represented in ASCII). It is converted into an u_long by means of strtoul(3). This value is then used to find a matching real key identifier (64 bits long).

RETURN VALUES
If a matching real key identifier is found it is written into keyid and 0 is returned. If an error occurs, -1 is returned.

SEE ALSO
dbopen(3) keydb_init(3) strtoul(3)

BUGS
There are only 2^32 possible "short" key identifiers while there are 2^64 possible real ones. The caller must assure himself that the correct key was indeed returned.

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