Created
May 31, 2016 06:52
-
-
Save anonymous/a3cbd4674ea16e5411aeba7c4f343a1d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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