lc_ctx_getkey(3)

lc_ctx_getkey3

Set librecast channel encoding options

Usage

#include <librecast/net.h>

int lc_ctx_getkey(lc_ctx_t *ctx, lc_key_t *key, int type); int lc_ctx_setkey(lc_ctx_t *ctx, lc_key_t *key, int type); int lc_channel_getkey(lc_channel_t *chan, lc_key_t *key, int type); int lc_channel_setkey(lc_channel_t *chan, lc_key_t *key, int type);

Compile and link with -llibrecast.

Library

Librecast library (liblibrecast, -llibrecast)

Overview

These functions get or set keys for a Librecast context ctx or channel chan.

isapointertoanlc_key_tstructure. The set functions will use this to set the key on the context or channel, and the set functions will return a copy of the current key in this structure.

The type argument must be one of the following options:

LC_CODE_SYMM

Symmetric key.

LC_CODE_PUBK

Public key.

Return value

These functions return zero on success. On error, -1 is returned and errno is set to indicate the error.

Errors

EINVAL

Invalid argument.

From liblibrecast-dev 0.9.1-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.