mirror of
https://github.com/status-im/c-kzg-4844.git
synced 2025-02-19 21:38:06 +00:00
Make the sha functions visible with objcopy
This will make portable builds tricky
This commit is contained in:
parent
dee1769ecc
commit
a1e5304cbc
@ -11,5 +11,8 @@ test: tests.py ckzg.so
|
|||||||
ecc_test: py_ecc_tests.py ckzg.so
|
ecc_test: py_ecc_tests.py ckzg.so
|
||||||
python $<
|
python $<
|
||||||
|
|
||||||
ckzg.so: ckzg.c ../../min-src/c_kzg_4844.o ../../lib/libblst.a
|
libblst.a: ../../lib/libblst.a
|
||||||
|
objcopy --globalize-symbol=sha256_init --globalize-symbol=sha256_update --globalize-symbol=sha256_final $< $@
|
||||||
|
|
||||||
|
ckzg.so: ckzg.c ../../min-src/c_kzg_4844.o libblst.a
|
||||||
clang -O -Wall -shared -fPIC -Wl,-Bsymbolic -I${INCLUDE_PY} ${addprefix -I,${INCLUDE_DIRS}} -o $@ $^
|
clang -O -Wall -shared -fPIC -Wl,-Bsymbolic -I${INCLUDE_PY} ${addprefix -I,${INCLUDE_DIRS}} -o $@ $^
|
||||||
|
@ -1048,9 +1048,9 @@ typedef struct {
|
|||||||
size_t off;
|
size_t off;
|
||||||
} SHA256_CTX;
|
} SHA256_CTX;
|
||||||
|
|
||||||
extern void sha256_init(SHA256_CTX *ctx);
|
void sha256_init(SHA256_CTX *ctx);
|
||||||
extern void sha256_update(SHA256_CTX *ctx, const void *_inp, size_t len);
|
void sha256_update(SHA256_CTX *ctx, const void *_inp, size_t len);
|
||||||
extern void sha256_final(unsigned char md[32], SHA256_CTX *ctx);
|
void sha256_final(unsigned char md[32], SHA256_CTX *ctx);
|
||||||
|
|
||||||
static void hash(uint8_t md[32], uint8_t input[], size_t n) {
|
static void hash(uint8_t md[32], uint8_t input[], size_t n) {
|
||||||
SHA256_CTX ctx;
|
SHA256_CTX ctx;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user