Created
May 31, 2016 07:13
-
-
Save anonymous/7c85e8f8bd63c1651d5d7c46361cf2f5 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" | |
output = "" | |
File.open('Ruby_Plaintext.txt', 'r') do |text| | |
read_in = text.read.split(" ") | |
read_in.each do |plaintext| | |
ciphertext = encrypt(plaintext, key) | |
output += ciphertext + " " | |
end | |
end | |
File.open('Ruby_Ciphertext.txt', 'w') { |file| file.write(output) } | |
passed = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment