table of contents
- experimental 0.11.2-1
LC_KEYPAIR_NEW(3) | Librecast Programmer's Manual | LC_KEYPAIR_NEW(3) |
NAME¶
lc_keypair_new - create new keypair
LIBRARY¶
Librecast library (liblibrecast, -llibrecast)
SYNOPSIS¶
#include <librecast/key.h>
int lc_keypair_new(lc_keypair_t *keypair, int flags);
Compile and link with -llibrecast.
DESCRIPTION¶
lc_keypair_new() creates a new signing or encryption keypair.
The new keypair will be returned in keypair.
flags can be any of the following:
- LC_KEY_SIG
- Generate a signing keypair.
- LC_KEY_ENC
- Generate an encryption keypair.
RETURN VALUE¶
lc_keypair_new() 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_keypair_new() can fail with the following errors:
- EINVAL
- Key generation failed.
SEE ALSO¶
lc_keyring_init(3), lc_keyring_free(3), lc_keyring_add(3), lc_keyring_del(3), lc_token_new(3)
2025-04-02 | LIBRECAST |