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
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request