GnuPG
GnuPG <br />============= <br /> A Command-line wrapper for GnuPG in ruby/rails. The secret decryption key only occupies the working directory for the duration of the decryption. <br /> Requirements: <br /> GnuPG installed on your box <br /> A working directory with the public key installed <br /> An ascii-export of your secret key, for dynamic loading/unloading of the decryption key <br /> </p>
<p> Usage: <br /> For Rails, you’ll definitely want to set the absolute paths, <br /> using RAILS_ROOT/path/to/your/working/directory</p>
<p> Assuming these options.. <br /> workdir = /tmp/gnupg_test/ <br /> passphrase = uglydonkeys <br /> </p>
<p> gnupg = GnuPG.new :binary=>”/opt/local/bin/gpg”, <br /> :workdir=>”/tmp/gnupg_test”, <br /> :homedir_pub=>”/tmp/gnupg_test”, <br /> :homedir_sec=>”/tmp/gnupg_test”, <br /> :recipient=>”your uid” <br /> puts plain_message = “no more saddam, haha” <br /> puts encrypted_message = gnupg.encrypt(plain_message) <br /> # Load ascii decryption sec key, wherever you may have it <br /> gnupg.load_key File.read(“secret_key.asc”) <br /> puts gnupg.decrypt(encrypted_message,’uglydonkeys’) <br /> gnupg.drop_key <br /> Thats it! You can, of course, store whatever you want to files, or to the database. <br />
<br />Author: <br /> Michael Cerna <br /> cerna5150@yahoo.com <br /> http://www.ahgsoftware.com <br /> AHG Software <br /> Antioch, Il USA <br />
- Repository Path: svn://ahgsoftware.com/gnupg/trunk
- Homepage: http://www.ahgsoftware.com/pages/plugins