#include #include #include "rscode-config.h" #include #include "rslib.h" void rslib_encode(int nbits, size_t msglen, char msg[static msglen], char out[msglen + NPAR]) { struct rscode_driver driver; rscode_init(&driver, nbits); rscode_encode(&driver, (unsigned char *)msg, msglen, (unsigned char *)out); } int rslib_decode(int nbits, size_t msglen, char msg_inout[static msglen]) { struct rscode_driver driver; rscode_init(&driver, nbits); return rscode_decode(&driver, (unsigned char *)msg_inout, msglen); } int rslib_gexp(int z, int nbits) { struct rscode_driver driver; rscode_init(&driver, nbits); return gexp(&driver, z); } size_t rslib_npar() { return NPAR; }