LC_KEYRING_INIT(3)

NAME
lc_keyring_init - initialize keyring

LIBRARY
Librecast library (liblibrecast, -llibrecast)

SYNOPSIS
#include <librecast/key.h>

int lc_keyring_init(lc_keyring_t *keyring, size_t nkeys);

void lc_keyring_free(lc_keyring_t *keyring);

Compile and link with -llibrecast.

DESCRIPTION
lc_keyring_init() initializes a keyring for use with tokens and filters.

lc_keyring_free() frees the storage allocated by lc_keyring_init().

keyring is a pointer to the keyring to initialize.

nkeys is the number of keys to allocate space for.

RETURN VALUE
lc_keyring_init() returns 0 if the call succeeds, or -1 if an error occurred. In the event of an error, errno is set to indicate the error.

ERRORS
lc_keyring_init() can fail with the following error:

ENOMEM
    Out of memory. Possibly, the application hit the RLIMIT_AS or RLIMIT_DATA limit described in getrlimit(2).

SEE ALSO
lc_keyring_add(3), lc_keyring_del(3), lc_keyring_has(3), lc_channel_filter_set(3), lc_channel_new(3), lc_keypair_new(3), getrlimit(2)