Provided by: liblibrecast-dev_0.8.0-1.1build1_amd64 bug

NAME

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

LIBRARY

       Librecast library (liblibrecast, -llibrecast)

SYNOPSIS

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

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.

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