Closed baicaihenxiao closed 8 years ago
Hello,
Sha256 is a one way hash function. It does not have a secret key,
Mike
On Sunday 30 October 2016, baicaihenxiao notifications@github.com wrote:
I know how to use SHA256 to handle a string like this:
char s[HASH_LEN]; sha256 sh;
shs256_init(&sh);
for (i=0;;i++) { if (string[i]==0) break; shs256_process(&sh,string[i]); } shs256_hash(&sh,s);
But I don't know how to set the SHA256' secret key, whether can I set it in the program? Thank you very much for any help
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/miracl/MIRACL/issues/33, or mute the thread https://github.com/notifications/unsubscribe-auth/ACm8jji_HB8vGq-Dr1HQjOPo60EC6w-Hks5q5Ea1gaJpZM4KkT4y .
Thank you, I think I have confused HMAC and SHA.
I know how to use SHA256 to handle a string like this:
But I don't know how to set the SHA256' secret key, whether can I set it in the program? Thank you very much for any help