From 0a6d74e1aebd372d9cce68887de147d85260737d Mon Sep 17 00:00:00 2001 From: Water-Melon Date: Thu, 25 Apr 2024 17:02:59 +0000 Subject: [PATCH] chore(tests): add sha test --- t/sha.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 t/sha.c diff --git a/t/sha.c b/t/sha.c new file mode 100644 index 0000000..37fffa8 --- /dev/null +++ b/t/sha.c @@ -0,0 +1,15 @@ +#include +#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; +}