I apologize if this has already been answered, or if the answer is simpler than I realize, but I can't seem to figure out the following:
When I try to generate an md5 from a string, either with
echo -n "string" | md5sum | cut -f1 -d' '
echo -n "string" | openssl md5
the result is not 32 characters, as I would expect, but rather 33 (using
So, I have a few questions:
- Why do both md5sum and openssl add a trailing space?
- Is there another way to generate an md5 hash without a trailing newline or space?
- Does the trailing space really matter?
Thank you all in advance.