LC_CTX_SET_SYM_KEY(3) | Librecast Programmer's Manual | LC_CTX_SET_SYM_KEY(3) |
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
Librecast library (liblibrecast, -llibrecast)
#include <librecast/net.h>
int lc_ctx_set_sym_key(lc_ctx_t *ctx, unsigned char *key, size_t len); int lc_ctx_set_pub_key(lc_ctx_t *ctx, unsigned char *key, size_t len); int lc_channel_set_sym_key(lc_channel_t *chan, unsigned char *key, size_t len); int lc_channel_set_pub_key(lc_channel_t *chan, unsigned char *key, size_t len");"
Compile and link with -llibrecast.
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.
These functions return zero on success. On error, -1 is returned and errno is set to indicate the error.
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)
2023-07-31 | LIBRECAST |