lc_ctx_set_sym_key, lc_ctx_set_pub_key, lc_channel_set_sym_key, lc_channel_set_pub_key - set Librecast
Contents
Description
These functions set encryption keys for a Librecast context ctx or channel chan.
The lc_ctx_set_sym_key() function sets a symmetric key of length len on a Librecast context. This key
will be used by default by any channels subsequently created using the context. Any existing channels
will retain their existing key.
The lc_ctx_set_pub_key() function sets a public key of length len on a Librecast context. This key will
be used by default by any channels subsequently created using the context. Any existing channels will
retain their existing key.
The lc_channel_set_sym_key() function sets a symmetric key of length len on a Librecast channel.
The lc_channel_set_pub_key() function sets a public key of length len on a Librecast channel.
Errors
EINVAL Invalid argument.
Library
Librecast library (liblibrecast, -llibrecast)
Name
lc_ctx_set_sym_key, lc_ctx_set_pub_key, lc_channel_set_sym_key, lc_channel_set_pub_key - set Librecast
channel encoding keys
Return Value
These functions return zero on success. On error, -1 is returned and errno is set to indicate the error.
See Also
lc_ctx_coding_set(3), lc_channel_new(3), lc_channel_close(3), lc_channel_coding_set(3), lc_channel_send(3), lc_ctx_new(3), lc_socket_setopt(3), lc_socket_recv(3) LIBRECAST 2023-07-31 LC_CTX_SET_SYM_KEY(3)
Synopsis
#include<librecast/net.h>intlc_ctx_set_sym_key(lc_ctx_t*ctx,unsignedchar*key,size_tlen);intlc_ctx_set_pub_key(lc_ctx_t*ctx,unsignedchar*key,size_tlen);intlc_channel_set_sym_key(lc_channel_t*chan,unsignedchar*key,size_tlen);intlc_channel_set_pub_key(lc_channel_t*chan,unsignedchar*key,size_tlen");"
Compile and link with -llibrecast.
