Ruby implementation of the chaocipher
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
README.md

README.md

Chao

A Ruby implementation of the Chaocipher. Not really intended for serious use, but it's somewhat strong, simple, and functional.

Usage

require 'chao'

key  = Chao.generate_key   # => ["RCGLKIWDAHSUVMFQZJPNBXTYEO", "ZIORTLCHJNWMDGQVAYBUXPKFSE"]
chao = Chao.new(*key)      # => #<Chao:0x10187adc8>
chao.encipher 'Some text.' # => 'WSFPBXVV'
chao.encipher 'More text.' # => 'LVARDINW'     

chao = Chao.new(*key)
chao.decipher 'WSFPBXVV'   # => 'SOMETEXT'
chao.decipher 'LVARDINW'   # => 'MORETEXT