c - Equivalent of md5 hashing in linux commands -
i have following code in c
u_char buf[64] = "hahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha"; //make md5 hash on buffer md5_init(&ctx); md5_update(&ctx, buf, sizeof(buf)); md5_final(buf, &ctx); md5_init, md5_update , md5_final openssl library.
the above code make md5 hash on buffer buf.
i want make same thing linux command using md5sum
$echo -n "hahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha" | md5sum but did not same result
what equivalent of md5 hashing in linux commands?
actually, md5sum equivalent.
echo prints out new-line character. try echo -n hahaha.... | md5sum.
Comments
Post a Comment