Skip to content

Instantly share code, notes, and snippets.

Created May 31, 2016 06:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/a3cbd4674ea16e5411aeba7c4f343a1d to your computer and use it in GitHub Desktop.
Save anonymous/a3cbd4674ea16e5411aeba7c4f343a1d to your computer and use it in GitHub Desktop.
if choice == "Encrypt"
File.open('Ruby_Plaintext.txt', 'r') do |text|
read_in = text.read.split(" ")
File.open('Ruby_Cyphertext.txt', 'w') |output|
read_in.each do |plaintext|
cyphertext = encrypt(plaintext, key)
output.write(cyphertext + " ")
end
output.close
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment