Skip to content

Pringley/bitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bitter

Build Status

Convert binary data to English gibberish using a dictionary of 2^16 words.

A normal 128-bit number can be encoded in hexidecimal as:

aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d

This is pretty tough to copy by hand. Why not use English? Bitter takes the same 128-bit number and encodes it as:

ponce scarlet successive toughened streamlines
superlative deng compressor pried dominions

The word list is available in words.txt.

Installation

Add this line to your application's Gemfile:

gem 'bitter'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bitter

Usage

You can encode and decode strings of bytes using Bitter.encode and Bitter.decode.

require 'bitter'
puts Bitter.encode File.new('pic.jpg').read

Bitter also works from the command line:

$ echo "Hello world" | bitter
electronically humblest impair

$ bitter myphoto.jpg > myphoto.jpg.txt
$ bitter --decode myphoto.jpg.txt > myphoto2.jpg
$ diff myphoto.jpg myphoto2.jpg

About

Represent binary data using English words

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages