On Aug 30, 2005, at 12:00 AM, Roberto Arias Alegria wrote:
Yeah I think the end of line was the key. After reading your posts I
realised that I needed this:
echo "mytext" | openssl dgst -md5
Anyway, I don't know why I got different hashes:
Using openssl:
echo "1122" | openssl dgst -md5
01ebeaafc334e503f4acc94a18df9fa5
and using MySQL:
SELECT md5("1122");
3b712de48137572f3849aabd5666a4e3
Because echo is appending a linefeed to the string.
$ echo -n "1122" | openssl dgst -md5
3b712de48137572f3849aabd5666a4e3
Josh
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [EMAIL PROTECTED]