attr_encrypted: Encrypts and Decrypts Your Attributes Transparently
attr_encrypted is a Ruby library by Sean Huber that generates attr_accessors that can encrypt and decrypt your attribute data transparently and on the fly. attr_encrypted comes as a gem, and isn't strictly for Rails only - it supports ActiveRecord and DataMapper out of the box, for example.
The README is so good that there's little else to say. All you need to do is add attr_encrypted :attribute_name, :key => 'some key' lines to your models and you're most of the way there.
January 11th, 2009 at 8:28 am
This is cool. Can't be any easier. It's small stuff like this, why I like Ruby and Rails so much.
January 12th, 2009 at 1:11 am
This is really great ... strange that it's taken so long for something so simple and useful to be done in such a straightforward way. ... but good!