I have the following code in C
u_char buf[64] = "hahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha";
//Make MD5 hash over buffer
MD5_Init(&ctx);
MD5_Update(&ctx, buf, sizeof(buf));
MD5_Final(buf, &ctx);
MD5_Init
, MD5_Update
and MD5_Final
are from openssl library.
The above code make a MD5 hash over the buffer buf
.
I want to make the same thing with linux command using md5sum
$echo -n "hahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha" | md5sum
but I did not get the same result
What is the equivalent of md5 hashing in linux commands?