puts [md5::md5 -hex "test_string"]
3474851A3410906697EC77337DF7AAE4
echo -n "test_string" | md5sum
3474851a3410906697ec77337df7aae4 -
So - wrong echo
, but what's with your tcl? Are you sure you posted correct example?
Domanda
The following tcl code generate the different result than md5sum executable
#!/usr/bin/tclsh
package require md5
puts [md5::md5 -hex "test_string"]
the result is:
3474851A3410906697EC77337DF7AAE4
In UNIX shell:
echo "test_string" | md5sum
the result is:
fd77c0776e992fc96647b3bc220b3adc -
Why the results are different?
Soluzione
puts [md5::md5 -hex "test_string"]
3474851A3410906697EC77337DF7AAE4
echo -n "test_string" | md5sum
3474851a3410906697ec77337df7aae4 -
So - wrong echo
, but what's with your tcl? Are you sure you posted correct example?