README in encrypted_strings-0.0.1 vs README in encrypted_strings-0.0.2
- old
+ new
@@ -10,30 +10,32 @@
Wiki
* http://wiki.pluginaweek.org/Encrypted_strings
-Blog
+Announcement
* http://www.pluginaweek.org/
-Subversion
+Source
* http://svn.pluginaweek.org/trunk/plugins/ruby/string/encrypted_strings
-Trac
+Development
* http://dev.pluginaweek.org/browse/trunk/plugins/ruby/string/encrypted_strings
-== Types of encryption supported
+== Description
-This plugin supports Hashed, Symmetric, and Asymmetric encryption modes.
+Encrypting and decrypting data is not exactly the most straightforward and DRY
+way. encrypted_strings greatly improves upon this syntax and adds
+straightforward support for encrypting values using SHA-1, Symmetric, and
+Asymmetric modes.
-== How to use
+== Usage
-This plugin adds the method 'encrypt' and other supporting methods to the String
-class, giving you the ability to easily encrypt strings.
+=== SHA Encryption
>> password = "shhhh"
=> "shhhh"
>> crypted_password = password.encrypt
=> "66c85d26dadde7e1db27e15a0776c921e27143bd"
@@ -53,11 +55,11 @@
future encryption and decryption of the string. The default encryptor uses
SHA-1 encryption. For encryption modes that do not support decryption, equality
with other strings is tested by encrypting the other string and checking whether
the resulting encrypted value is the same.
-If you wanted to use symmetric encryption, you could do so with the following:
+=== Symmetric Encryption
>> password = "shhhh"
=> "shhhh"
>> crypted_password = password.encrypt(:symmetric, :key => "my_key")
=> "jDACXI5hMPI=\n"
@@ -68,30 +70,23 @@
>> password = crypted_password.decrypt
=> "shhhh"
=== Asymmetric encryption
-The public and private key file names can be set via the following:
-
- PluginAWeek::EncryptedStrings::AsymmetricEncryptor.default_public_key_file = "./public.key"
- PluginAWeek::EncryptedStrings::AsymmetricEncryptor.default_private_key_file = "./private.key"
-
-== In-place editing
-
-In addition to generating the encrypted/decrypted strings, you can also
-replace the original string by using the bang:
-
>> password = "shhhh"
=> "shhhh"
- >> password.encrypt!(:symmetric, :key => "my_key")
- => "jDACXI5hMPI=\n"
- >> password
- => "jDACXI5hMPI=\n"
- >> password.decrypt!
+ >> crypted_password = password.encrypt(:asymmetric, :public_key_file => "./public.key", :private_key_file => "./private.key")
+ => "NEwVzcikYUKfS8HTc9L9eg/dMxBCLZ/nFr7J1aQYjkl3I2MPUD0lmjr/saC6\nTJEPwOl60Ki24H8TUwnGtZy14A==\n"
+ >> crypted_password.class
+ => String
+ >> crypted_password == "shhhh"
+ => true
+ >> password = crypted_password.decrypt
=> "shhhh"
- >> password
- => "shhhh"
+== Dependencies
+
+This plugin does not depend on the presence of any other plugins.
+
== References
-A huge thanks to Rick Olson and his Sentry plugin over at http://svn.techno-weenie.net/projects/plugins/sentry/.
-Much of this plugin's code is based on his work.
\ No newline at end of file
+* Rick Olson - http://svn.techno-weenie.net/projects/plugins/sentry/