Project

ruby-rc4

1.86
Repository is archived
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
RubyRC4 is a pure Ruby implementation of the RC4 algorithm.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
 Dependencies

Development

>= 0
 Project Readme

RC4

RC4 is a pure Ruby implementation of the RC4 algorithm.

Install

Just install the gem:

gem install ruby-rc4

Or add it to your Gemfile:

gem 'ruby-rc4'

Usage

First require the gem:

require 'rc4'

To encrypt:

key = "nuff rspec"
enc = RC4.new(key)
encrypted = enc.encrypt("super-cool-test")

To decrypt:

dec = RC4.new(key)
decrypted = dec.decrypt(encrypted)

Since encrypt method is used for encryption and decryption, decrypt is just an alias to encrypt in order to make the usage more intuitive.

Note

The original algorithm implementation in Ruby by Max Prokopiev.

Aleksandar Simic then modified it to include a test suite and gem packaged it using gem-this.

I switched the project to use rspec2 and I am now the project's primary maintainer.

Caige Nichols

License

Ruby-RC4 is released under the MIT license.

Contributors

(Please let me know if I missed anyone)