Sha256: 32659fc44bd0ea43ff0102705c763c38b5a098fd65745071e3d22eed1b2335a3

Contents?: true

Size: 1.29 KB

Versions: 3

Compression:

Stored size: 1.29 KB

Contents

# RedactedAttributes

Stores redacted plain text version of an encrypted value

If you find yourself encrypting a value that you need to sort by, then this gem might help. It stores a redacted version of the string, the first three characters, in another column.

This gem is intended to be used with the symmetric-encryption gem. It assumes that a `redacted_attribute` column exists for the encrypted attribute.

## Example

Let's assume we have the following ActiveRecord model defined.

```ruby
class Widget < ActiveRecord::Base
  attr_encrypted :name
  attr_redacted  :name
end
```

This would require the database schema to look something like this.

```ruby
  create_table "patients", :force => true do |t|
    t.string "encrypted_name"
    t.string "redacted_name"
  end
```

## Installation

Add this line to your application's Gemfile:

    gem 'redacted_attributes'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install redacted_attributes

## Usage

TODO: Write usage instructions here

## Contributing

1. Fork it ( http://github.com/corgibytes/redacted_attributes/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
redacted_attributes-1.1.1 README.md
redacted_attributes-1.1.0 README.md
redacted_attributes-1.0.0 README.md