Man page - lc_channel_set_pub_key(3)

Packages contains this manual

Manual

LC_CTX_SET_SYM_KEY

NAME
LIBRARY
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
SEE ALSO

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

LIBRARY

Librecast library ( liblibrecast , -llibrecast )

SYNOPSIS

#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 .

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.

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.

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)