You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is my code to implement a founctionlity to caculate hash value of any input
#include <stdio.h>
#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
The text was updated successfully, but these errors were encountered:
this is my code to implement a founctionlity to caculate hash value of any input
#include <stdio.h>
#include "miracl.h"
void calculate_sha256_hash(const char* input, char* output) {
sha256 sh;
int i;
char digest[32];
}
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
The text was updated successfully, but these errors were encountered: