I am reading the RFC2408(https://www.rfc-editor.org/rfc/rfc2408). I have a question about "Vendor ID section" at page 43(https://www.rfc-editor.org/rfc/rfc2408#page-43). The document says,
For instance: "Example Company IPsec. Version 97.1" (not including the quotes) has MD5 hash: 48544f9b1fe662af98b9b39e50c01a5a, when using MD5file.
But I use many md5 tools like 'md5sum' command or online tools, that they all got result "3245b3577c9e4f751675322f259ff016".
I tried the command on Linux:
echo -n "Example Company IPsec. Version 97.1" | md5sum
3245b3577c9e4f751675322f259ff016 -
I got different result, I believe the RFC ducument would not be wrong, So I wonder where am I wrong, or do I miss some thing?
The MD5 hash is actually of the value:
Example Company IPsec. Version 97.1\n
That is, only one space separates IPsec.
and Version
and there is a newline character at the end.
So you get this with:
echo "Example Company IPsec. Version 97.1" | md5sum
48544f9b1fe662af98b9b39e50c01a5a -
Please note two things: