ALG_SIG.C(3)
π ALG_SIG.C(3) π
okay so this is the liberasurecode manual page, and the file at the heart of it is /build/source/src/utils/chksum/alg_sig.c β manual name folded in near the top like a good little header, no boring copy-paste line, periodt. π«Ά
πΈ NAME πΈ
/build/source/src/utils/chksum/alg_sig.c β literally the file this page documents. That's the name, bestie, and yes it's a path with main character energy. π
β¨ SYNOPSIS β¨
vibe check first: include these headers, okay?
#include <dlfcn.h>
#include <alg_sig.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
π Macros π
these two macro names are giving string-literal keys:
#define GALOIS_SINGLE_MULTIPLY 'galois_single_multiply'
#define GALOIS_UNINIT 'galois_uninit_field'
π¦ Functions π¦
here's the whole function cast list, exactly as the page spells them:
static galois_single_multiply_func get_galois_multi_func (void *handle)
static void stub_galois_uninit_field (int w)
static galois_uninit_field_func get_galois_uninit_func (void *handle)
static void * get_jerasure_sohandle (void)
static int load_gf_functions (void *sohandle, struct jerasure_mult_routines *routines)
static alg_sig_t * init_alg_sig_w8 (void *jerasure_sohandle, int sig_len)
static alg_sig_t * init_alg_sig_w16 (void *jerasure_sohandle, int sig_len)
__attribute__ ((visibility('internal')))
static int compute_w8_alg_sig_32 (alg_sig_t *alg_sig_handle, char *buf, int len, char *sig)
static int compute_w16_alg_sig_64 (alg_sig_t *alg_sig_handle, char *buf, int len, char *sig)
static int compute_w16_alg_sig_32 (alg_sig_t *alg_sig_handle, char *buf, int len, char *sig)
static int compute_alg_sig_32 (alg_sig_t *alg_sig_handle, char *buf, int len, char *sig)
static int compute_alg_sig_64 (alg_sig_t *alg_sig_handle, char *buf, int len, char *sig)
π¦ Variables π¦
and the one variable out here holding it down:
static int valid_pairs [][2] = { { 8, 32}, {16, 32}, {16, 64}, {-1, -1} }
π Macro Definition Documentation π
π GALOIS_SINGLE_MULTIPLY π
#define GALOIS_SINGLE_MULTIPLY 'galois_single_multiply'
Definition at line 30 of file alg_sig.c.
Referenced by get_galois_multi_func().
π GALOIS_UNINIT π
#define GALOIS_UNINIT 'galois_uninit_field'
Definition at line 31 of file alg_sig.c.
Referenced by get_galois_uninit_func().
π₯ Function Documentation π₯
π«Ά __attribute__ ((visibility('internal')) ) π«Ά
__attribute__ ((visibility('internal')) )
Definition at line 233 of file alg_sig.c.
References get_jerasure_sohandle(), init_alg_sig_w16(), init_alg_sig_w8(), and valid_pairs.
π« compute_alg_sig_32 π«
int compute_alg_sig_32 (alg_sig_t * alg_sig_handle, char * buf, int len, char * sig)
[static]
Definition at line 427 of file alg_sig.c.
References compute_w16_alg_sig_32(), and compute_w8_alg_sig_32().
π« compute_alg_sig_64 π«
int compute_alg_sig_64 (alg_sig_t * alg_sig_handle, char * buf, int len, char * sig)
[static]
Definition at line 438 of file alg_sig.c.
References compute_w16_alg_sig_64().
π compute_w16_alg_sig_32 π
int compute_w16_alg_sig_32 (alg_sig_t * alg_sig_handle, char * buf, int len, char * sig)
[static]
This is the loop to optimize. It is currently optimized enough : using Horner's alg., shortened mult. tables, and other tricks.
Definition at line 380 of file alg_sig.c.
Referenced by compute_alg_sig_32().
π compute_w16_alg_sig_64 π
int compute_w16_alg_sig_64 (alg_sig_t * alg_sig_handle, char * buf, int len, char * sig)
[static]
This is the loop to optimize. It is currently optimized enough : using Horner's alg., shortened mult. tables, and other tricks.
Definition at line 325 of file alg_sig.c.
Referenced by compute_alg_sig_64().
π compute_w8_alg_sig_32 π
int compute_w8_alg_sig_32 (alg_sig_t * alg_sig_handle, char * buf, int len, char * sig)
[static]
This is the loop to optimize. It is currently optimized enough : using Horner's alg., shortened mult. tables, and other tricks.
Definition at line 296 of file alg_sig.c.
Referenced by compute_alg_sig_32().
π¦ get_galois_multi_func π¦
galois_single_multiply_func get_galois_multi_func (void * handle)
[static]
Definition at line 36 of file alg_sig.c.
References GALOIS_SINGLE_MULTIPLY.
Referenced by load_gf_functions().
π¦ get_galois_uninit_func π¦
galois_uninit_field_func get_galois_uninit_func (void * handle)
[static]
Definition at line 52 of file alg_sig.c.
References GALOIS_UNINIT.
Referenced by load_gf_functions().
π¦ get_jerasure_sohandle π¦
void * get_jerasure_sohandle (void )
[static]
Definition at line 67 of file alg_sig.c.
Referenced by __attribute__().
π init_alg_sig_w16 π
alg_sig_t * init_alg_sig_w16 (void * jerasure_sohandle, int sig_len)
[static]
Definition at line 153 of file alg_sig.c.
References load_gf_functions().
Referenced by __attribute__().
π init_alg_sig_w8 π
alg_sig_t * init_alg_sig_w8 (void * jerasure_sohandle, int sig_len)
[static]
Definition at line 96 of file alg_sig.c.
References load_gf_functions().
Referenced by __attribute__().
π«Ά load_gf_functions π«Ά
int load_gf_functions (void * sohandle, struct jerasure_mult_routines * routines)
[static]
It is possible that the underlying Jerasure implementation is old (pre-jerasure.org). If so, there is not an uninit function, so these tests will fail.
Since nothing is using alg_sig at the moment, we stub the uninit function to unblock the tests. Once we plug the internal GF functions into alg_sig, this can jsut go away.
Definition at line 72 of file alg_sig.c.
References get_galois_multi_func(), get_galois_uninit_func(), and stub_galois_uninit_field().
Referenced by init_alg_sig_w16(), and init_alg_sig_w8().
π«Ά stub_galois_uninit_field π«Ά
void stub_galois_uninit_field (int w)
[static]
Definition at line 50 of file alg_sig.c.
Referenced by load_gf_functions().
π Variable Documentation π
π valid_pairs π
int valid_pairs[][2] = { { 8, 32}, {16, 32}, {16, 64}, {-1, -1} } [static]
Definition at line 34 of file alg_sig.c.
Referenced by __attribute__().
π Author π
Generated automatically by Doxygen for liberasurecode from the source code.
Version 1.8.0 β dated Tue Jan 1 1980 00:0 β from /build/source...sum/alg_sig.c(3). that's the whole page, bestie; hydrate, compile, and slay. πβ¨
π¦ where this page comes from
- nixpkgs unstable: liberasurecode 1.8.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms