Rencrypt is a project mainly written in Ruby, it's free.
ruby encryption library
Warranty
This software is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.
To create a key: % openssl genrsa -des3 -out private.pem 2048 Generating RSA private key, 2048 bit long modulus ......+++ .+++ e is 65537 (0x10001) Enter pass phrase for private.pem: Verifying - Enter pass phrase for private.pem:
Then: % openssl rsa -in private.pem -out public.pem -outform PEM -pubout Enter pass phrase for private.pem: writing RSA key
To Encrypt:
require 'REncrypt' => true privkey='/path/to/private.pem' => "/path/to/private.pem" pubkey='/path/to/public.pem' => "/path/to/public.pem" a= Rencrypt.encryptsensitive(pubkey, "some kind of data") => ["