miracl / MIRACL

MIRACL Cryptographic SDK: Multiprecision Integer and Rational Arithmetic Cryptographic Library is a C software library that is widely regarded by developers as the gold standard open source SDK for elliptic curve cryptography (ECC).
https://miracl.com
645 stars 242 forks source link

I have successfully install the miracl to my linux OS,but I cannot use some functionlity definede in the "miracl.h" fine #125

Open vegetablebirdjwx opened 1 year ago

vegetablebirdjwx commented 1 year ago

this is my code to implement a founctionlity to caculate hash value of any input

include

include "miracl.h"

void calculate_sha256_hash(const char input, char output) { sha256 sh; int i; char digest[32];

shs256_init(&sh);
for (i = 0; input[i] != 0; i++) {
    shs256_process(&sh, input[i]);
}
shs256_hash(&sh, digest);

for (i = 0; i < 32; i++) {
    printf(output + (i * 2), "%02x", digest[i]);
}

} in the miracl.h file these three functionlity have been defined as followed extern void shs_init(sha ); extern void shs_process(sha ,int); extern void shs_hash(sha ,char );

so what should I do to use these functionlity