README.markdown in shuber-attr_encrypted-1.0.0 vs README.markdown in shuber-attr_encrypted-1.0.1

- old
+ new

@@ -1,11 +1,13 @@ attr\_encrypted =============== Generates attr\_accessors that encrypt and decrypt attributes transparently +Works with any class including ActiveRecord and DataMapper + Installation ------------ gem install shuber-attr_encrypted --source http://gems.github.com @@ -213,14 +215,16 @@ ### Encoding ### You're probably going to be storing your encrypted attributes somehow (e.g. filesystem, database, etc) and may run into some issues trying to store a weird -encrypted string. I've had this problem myself using MySQL. You can simply pass the `:encode` option to automatically base64 encode/decode when encrypting/decrypting. +encrypted string. I've had this problem myself using MySQL. You can simply pass the `:encode` option to automatically encode/decode when encrypting/decrypting. class User attr_encrypted :email, :key => 'some secret key', :encode => true end + +The default encoding is `m*` (base64). You can change this by setting `:encode => 'some encoding'`. See [Array#pack](http://www.ruby-doc.org/core/classes/Array.html#M002245) for more encoding options. ### Marshaling ### You may want to encrypt objects other than strings (e.g. hashes, arrays, etc). If this is the case, simply pass the `:marshal` option to automatically marshal \ No newline at end of file