Skip to content

Instantly share code, notes, and snippets.

@jwoertink
Created February 12, 2014 00:48
Show Gist options
  • Select an option

  • Save jwoertink/8947684 to your computer and use it in GitHub Desktop.

Select an option

Save jwoertink/8947684 to your computer and use it in GitHub Desktop.
require './encryptor'
read_file = File.open('secret.txt')
word = read_file.read
read_file.close
e = Encryptor.new(rand(20))
encrypted_word = e.encrypt(word)
write_file = File.open('secret.txt', 'w+')
write_file.write(encrypted_word)
write_file.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment