logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

lc_ctx_getkey, lc_ctx_setkey, lc_channel_getkey, lc_channel_setkey - set Librecast channel encoding

Description

       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.

Errors

EINVAL Invalid argument.

Library

       Librecast library (liblibrecast, -llibrecast)

Name

       lc_ctx_getkey,  lc_ctx_setkey,  lc_channel_getkey,  lc_channel_setkey  -  set  Librecast channel encoding
       options

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_channel_set_sym_key(3), lc_ctx_new(3), lc_socket_setopt(3), lc_socket_recv(3)

LIBRECAST                                          2023-07-31                                   LC_CTX_GETKEY(3)

Synopsis

#include<librecast/net.h>intlc_ctx_getkey(lc_ctx_t*ctx,lc_key_t*key,inttype);intlc_ctx_setkey(lc_ctx_t*ctx,lc_key_t*key,inttype);intlc_channel_getkey(lc_channel_t*chan,lc_key_t*key,inttype);intlc_channel_setkey(lc_channel_t*chan,lc_key_t*key,inttype);

       Compile and link with -llibrecast.

See Also