Initial catchat commit.
This commit is contained in:
commit
8b30fe923c
9 changed files with 460 additions and 0 deletions
50
runner.rb
Normal file
50
runner.rb
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
require "rmagick"
|
||||
|
||||
require "./image_utils.rb"
|
||||
require "./encode_image.rb"
|
||||
|
||||
img = Magick::ImageList.new "./images/original/arty.png"
|
||||
|
||||
#srand(12345)
|
||||
|
||||
pass = "my_password"
|
||||
message = "This is the message that I would like to save please " +
|
||||
"and thank you also I love you? AND apostrophe's, and " +
|
||||
"also some commas somewhere hiding around here, It's " +
|
||||
"gonna be pushing it a bit here... 1234567 let's huck " +
|
||||
"some more stuff in here to bump it to 255. Wow. We " +
|
||||
"are going even further. further than anyone believed " +
|
||||
"`~!@\#\{$%^&*()-_=+\][}{';:'}]} Wooow. 123456789!1234" +
|
||||
"56789! so put 15 more??????400!"
|
||||
#message = "tests"
|
||||
|
||||
puts message.length
|
||||
puts message
|
||||
puts
|
||||
|
||||
puts "Initializing EncodeImage..."
|
||||
|
||||
start = Time.new.to_f
|
||||
|
||||
em = EncodeImage.new(pass, message, img)
|
||||
|
||||
puts em.encode
|
||||
puts "Took " + (Time.new.to_f - start).to_s + " seconds to encode... 🐱"
|
||||
puts
|
||||
|
||||
start = Time.new.to_f
|
||||
|
||||
result = em.decode
|
||||
|
||||
puts result
|
||||
|
||||
puts "Took " + (Time.new.to_f - start).to_s + " seconds to decode... 🐱"
|
||||
|
||||
if message == result then
|
||||
puts "WOW THEY MATCH! 🐱🐱🐱🐱🐱🐱🐱🐱"
|
||||
end
|
||||
|
||||
exit
|
||||
puts
|
||||
|
||||
puts "Done!"
|
||||
Loading…
Add table
Add a link
Reference in a new issue