[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 838 Bytes

README.md

File metadata and controls

37 lines (27 loc) · 838 Bytes

chaotic maps

A ruby library to encrypt image or text inputs based on chaotic maps.

Maps : Baker's Map, Horseshoe Map, Henon's Map, Arnold's Cat Map

Requires :

'image.rb' uses 'chunky_png' gem for processing images and hence it should be installed.
'text.rb' is self-contained.

 gem install chunky_png 

Usage :

Text Inputs -

require 'text.rb'

txt = Text.new('./filepath/sometextfile')

bakerMatrix = txt.bakerMap(10) 
horseShoeMatrix = txt.horseShoeMap(10)  
# 10 is number of iterations for which the mapping is repeated, default value is 1

Image inputs -

require 'image.rb'

img = Image.new('./filepath/somePNG')

img.bakerMap(10) 
img.horseShoeMap(10)
img.acMap(10) # Arnold's cat map
img.henonMap(10)
# check output/ directory for the scrambled images