Skip to content

Commit

Permalink
chore(tests): add sha test
Browse files Browse the repository at this point in the history
  • Loading branch information
Water-Melon committed Apr 25, 2024
1 parent 64791ee commit 0a6d74e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions t/sha.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include <stdio.h>
#include "mln_sha.h"

int main(int argc, char *argv[])
{
mln_sha256_t s;
char text[1024] = {0};

mln_sha256_init(&s);
mln_sha256_calc(&s, (mln_u8ptr_t)"Hello", sizeof("Hello")-1, 1);
mln_sha256_tostring(&s, text, sizeof(text)-1);
printf("%s\n", text);

return 0;
}

0 comments on commit 0a6d74e

Please sign in to comment.