README in encrypted_attributes-0.0.1 vs README in encrypted_attributes-0.0.2
- old
+ new
@@ -1,8 +1,8 @@
= encrypted_attributes
-encrypted_attributes adds support for automatically encrypting ActiveRecord
++encrypted_attributes+ adds support for automatically encrypting ActiveRecord
attributes.
== Resources
API
@@ -13,11 +13,11 @@
* http://wiki.pluginaweek.org/Encrypted_attributes
Announcement
-* http://www.pluginaweek.org/
+* http://www.pluginaweek.org
Source
* http://svn.pluginaweek.org/trunk/plugins/active_record/miscellaneous/encrypted_attributes
@@ -30,15 +30,17 @@
Encrypting attributes can be repetitive especially when doing so throughout
various models and various projects. encrypted_attributes, in association
with the encrypted_strings plugin, helps make encrypting ActiveRecord
attributes easier by automating the process.
-The options that #encrypts takes includes all of the encryption options for
+The options that +encrypts+ takes includes all of the encryption options for
the specific type of encryptor being used in the encrypted_strings plugin.
Therefore, if setting the key for asymmetric encryption, this would be passed
-into the #encrypts method. Examples of this are shown below.
+into the +encrypts+ method. Examples of this are show in the Usage section.
+== Usage
+
=== SHA Encryption
For SHA encryption, you can either use the default salt, a custom salt, or
generate one based on the attributes of the model. If the latter option is
being used, a column in the table should be created to store the salt that is
@@ -85,13 +87,13 @@
=== The crypted attribute
The attribute which stores the unencrypted value is a "virtual" attribute.
This means that there is no column with the same name in the database.
Instead, the encrypted value is stored in the crypted attributed. By default,
-this is assumed to be "crypted_#{attr_name}". Therefore, if you are encrypting
+this is assumed to be +crypted_#{attr_name}+. Therefore, if you are encrypting
the "password" attribute, the encrypted value would be stored in
-"crypted_password".
++crypted_password+.
The crypted attribute name can be customized like so:
class User < ActiveRecord::Base
encrypts :password, :crypted_name => 'protected_password'
@@ -103,14 +105,12 @@
see the unit tests. Also, see encrypted_strings for more information about
the various options that can be passed in.
== Testing
-This plugin requires that the plugin_test_helper gem be installed in order to
-run the unit tests. To install this gem:
+Before you can run any tests, the following gem must be installed:
+* plugin_test_helper[http://wiki.pluginaweek.org/Plugin_test_helper]
- gem install plugin_test_helper
-
== Dependencies
This plugin depends on the presence of the following plugins:
-# encrypted_strings - http://wiki.pluginaweek.org/Encrypted_strings
\ No newline at end of file
+* encrypted_strings[http://wiki.pluginaweek.org/Encrypted_strings]