keys_from_string(3)

NAME
keys_from_string - find keys matching a string

SYNOPSIS
#include <pgplib.h>
int
keys_from_string(char *string, int case, int *numkeys, PGPKEYID **keys);
.

DESCRIPTION
First, string is looked up the the database. If a key has this string as a user identification, that key is returned. If this string is not found, the database is scanned looking for matches. If case is true (non zero) we preserve case, if not, everything is converted to UPPER case before comparison. When scanning for keys, many may be found. The number of keys found (and returned) is returned in numkeys. The array of key identifiers, returned in keys, is allocated by means of malloc() and the caller must free the memory when it is no longer needed. .

RETURN VALUES
If nothing goes wrong, 0 is returned. Otherwise, -1 is returned. free(3) malloc(3) toupper(3) keydb_init(PGPlib) PGPlib(3)

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