Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Simple RSA encryption for Ruby
Branch: master

This branch is even with qhoxie:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.document
.gitignore
LICENSE
README.md
Rakefile
VERSION
rcrypt.gemspec

README.md

RCrypt

RCrypt is a simple RSA encryption library for your Ruby scripts. It aims at being a no-frills encrypt-decrypt solution when that is all you actually need.

Installation

gem install qhoxie-rcrypt --source http://gems.github.com

Usage

There are a few ways to set your keys:

>> RCrypt.private_key_file "path/to/id_rsa"     # you can
>> RCrypt.public_key_file "path/to/id_rsa.pub"  # specify the files
>> RCrypt.generate_key_pair                     # or generate the keys in RCrypt
=> {:public => "...", :private => "..."}

Once the keys are set, you can encrypt and decrypt.

>> ciphertext = RCrypt.encrypt "secret"
=> "xO0h20SZZ3US6BJGOyl0mnjF1FIVqax8=="
>> RCrypt.decrypt ciphertext
=> "secret"

Comments/Suggestions/Requests

Email me: qhoxie on gmail.com

Copyright

Copyright (c) 2009 Quin Hoxie. See LICENSE for details.

Something went wrong with that request. Please try again.