Project

rcrypt

0.0
No commit activity in last 3 years
No release in over 3 years
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.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

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.