in reply to How to hash a string--not data structure
Hi,
See for example Digest::SHA.
Hope this helps!