attr_encrypted: Encrypts and Decrypts Your Attributes Transparently

In Miscellaneous

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.

Post to Twitter Tweet This Post

Vaguely Related Posts (Usually)

2 Comment Responses to “attr_encrypted: Encrypts and Decrypts Your Attributes Transparently”

  1. #1
    Markus Jais Says:

    This is cool. Can't be any easier. It's small stuff like this, why I like Ruby and Rails so much.

  2. #2
    Paul Campbell Says:

    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!

Leave a Reply