Skip to content

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

@vegetablebirdjwx

Description

@vegetablebirdjwx

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions