Gpgr by Ryan Stenhouse <ryan@ryanstenhouse.eu>, March 2010 on behalf of Purchasing Card Consultancy Limited.

gpgr is a very light interface to the command-line GPG (GNU Privacy Guard) tool which is soley concerned with making it as easy as possible to encrypt files with one (or more) public keys.

It does not provide any major key management tools and does not support decryption.

Usage:

require 'rubygems'
require 'gpgr'

# Synopsis
#
list_of_keys = [ 'foo@example.com', 'bar@example.com' ]
Gpgr::Encrypt.file('/some_file.txt', :to => '/encrypted.gpg').encrypt_using(list_of_keys)

# To import all the public keys in a given directory
#
Gpgr::Keys.import_keys_at('/path/to/public/keys')

#  Will encrypt for every single person you have a public key for
#
Gpgr::Encrypt.file('/some_file.txt', :to => '/encrypted.gpg').encrypt_using(Gpgr::Keys.installed_public_keys)