danpal/attr_encryptor — pull request #14 by ileitch (2012-09-07 23:34:09+00:00)
Title: Generate a salt with more change of being random.

When saving many records in quick succession `Time.now.to_i` results in many identical salts.

Also the tests were failing for me due to key length, so I fixed those.

Ideally we would use SecureRandom for the salt, however it isn't present in 1.8.

I'm happy to switch to SecureRandom if you want to drop support for 1.8.