Repository is archived
No commit activity in last 3 years
No release in over 3 years
AES encrypted attributes with Rails. Behaves similarly to Rails's #serialize and works for versions 2.3.x & 3.2.x.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
>= 0
 Project Readme

Build Status

EncryptedAttributes

Usage

Rails

Create an initializer that will configure the EncryptedAttributes module with your Key and IV.

EncryptedAttributes.setup(:key => 'YOUR RANDOM KEY', :iv => 'YOUR RANDOM INITIALIZATION VECTOR')

Encrypt your columns like.

class Deployment < ActiveRecord::Base
  extend EncryptedAttributes

  serialize :secret_config, Hash
  encrypt :secret_config
end

Running the intergration tests locally

Ensure you have a MySQL table called encrypted_attributes_test.

Running the specs for Rails 2.3.x:

export BUNDLE_GEMFILE=gemfiles/rails-2_3.gemfile
bundle install
bundle exec rspec spec/

And Rails 3.0.x:

export BUNDLE_GEMFILE=gemfiles/rails-3_2.gemfile
bundle install
bundle exec rspec spec/

Authors

Created and maintained by

Chris Lowder

Patches contributed by

Contributor List

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request