I am trying to compute the hash value of some words using sha256, but when I use sha256_update() function,
typedef unsigned char BYTE;
BYTE text1[] = {"abcd"};
sha256_update(&ctx, text1, strlen(text1));
use strlen() on BYTE type will give me some warnings, so I want to know what is the proper way to get the length of the text1?
In file included from /usr/include/memory.h:29:0,
from sha256-test.c:16:
/usr/include/string.h:384:15: note: expected ‘const char *’ but argument is of type ‘BYTE {aka unsigned char}’
extern size_t strlen (const char *__s)
^~~~~~
sha256-test.c:54:36: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
sha256_update(&ctx, text1, strlen(text1));