On Fri, Aug 21, 2009 at 11:45 AM, [email protected]<[email protected]> wrote:
>
>
> I'm having problems not being able to get the MD5 digest from ruby to
> match the digest from the md5sum command in the bash shell
>
> Digest::MD5.hexdigest("String")
>
> is not producing the same hash as
>
> echo "String" | md5sum
>
> in the shell.
>
> Am I missing something here?

Yes, the echo command adds a new line character to the end.

try:

echo -n "String" | md5sum

-- 
Aaron Turner
http://synfin.net/
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
    -- Benjamin Franklin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to