in reply to Numeric representation of strings

It looks that what you are looking for is a digest: Digest::SHA