This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Fri Jul 04 15:49:24 -0700 2008 | [obrie] |
| |
CHANGELOG.rdoc | Thu Dec 04 16:54:25 -0800 2008 | [obrie] |
| |
LICENSE | Wed Jun 25 20:23:39 -0700 2008 | [obrie] |
| |
README.rdoc | Mon Dec 01 18:33:19 -0800 2008 | [obrie] |
| |
Rakefile | Thu Dec 04 16:54:25 -0800 2008 | [obrie] |
| |
init.rb | Wed Oct 25 18:19:47 -0700 2006 | [obrie] |
| |
lib/ | Thu Dec 04 16:53:19 -0800 2008 | [obrie] |
| |
test/ | Mon Dec 01 18:33:19 -0800 2008 | [obrie] |
README.rdoc
= encrypted_strings +encrypted_strings+ provides dead-simple string encryption/decryption syntax. == Resources API * http://api.pluginaweek.org/encrypted_strings Bugs * http://pluginaweek.lighthouseapp.com/projects/13270-encrypted_strings Development * http://github.com/pluginaweek/encrypted_strings Source * git://github.com/pluginaweek/encrypted_strings.git == Description Encrypting and decrypting data is not exactly the most straightforward and DRY way. encrypted_strings improves the syntax and reduces the complexity, adding straightforward support for encrypting values using SHA-1, Symmetric, and Asymmetric ciphers. == Usage === SHA Encryption >> password = 'shhhh' => "shhhh" >> encrypted_password = password.encrypt => "66c85d26dadde7e1db27e15a0776c921e27143bd" >> encrypted_password.class => String >> encrypted_password.cipher => #<PluginAWeek::EncryptedStrings::ShaCipher:0x2b9238889460 @salt="salt"> >> encrypted_password == 'shhhh' => true >> encrypted_password.decrypt NotImplementedError: Decryption is not supported using a(n) PluginAWeek::EncryptedStrings::ShaCipher from ./script/../config/../config/../vendor/plugins/encrypted_strings/lib/encrypted_strings/cipher.rb:13:in `decrypt' from ./script/../config/../config/../vendor/plugins/encrypted_strings/lib/encrypted_strings/extensions/string.rb:52 :in `decrypt' from (irb):40 When encrypt is called, it creates a +cipher+ instance which is used for future encryption and decryption of the string. The default cipher uses SHA-1 encryption. For ciphers 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. === Symmetric Encryption >> password = 'shhhh' => "shhhh" >> crypted_password = password.encrypt(:symmetric, :password => 'secret_key') => "qSg8vOo6QfU=\n" >> crypted_password.class => String >> crypted_password == 'shhhh' => true >> password = crypted_password.decrypt => "shhhh" === Asymmetric encryption >> password = 'shhhh' => "shhhh" >> 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" == Dependencies None. == References * Rick Olson - sentry[http://github.com/technoweenie/sentry]





