I am looking for advise about best practices of generating unique hash strings in Ruby/Rails. Usually I use MD5, SHA etc to do this, but it was not quite straightforward to choose source values for hash (timestamps not always prefered to be used).
So my question are:
- What values prefered to be used for generating unique hashes? (database column values, timestamps etc)
- Are there any gems for this kind of work?
Any advise would be appreciated.
Use UUIDs:
In ruby 1.9
In ruby 1.8