Created
December 7, 2018 20:40
-
-
Save msepcot/edd604bc605967a2ccd5bc6b484a31aa to your computer and use it in GitHub Desktop.
The Fated Sky: A Lady Astronaut Novel, Chapter 16 cypher text.
This file contains hidden or 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
PLAINTEXT = %w(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) | |
CRYPTTEXT = %w(E L P H A N T B C D F G I J K M O Q R S U V W X Y Z) | |
input = "Cj qarmkjra sk ykuq gers gassaq, C ei waeqcjt iy ngctbs rucs lus hk jks beva e lqe kj. Cn yku waqa baqa, C wkugh sefa yku cjsk sba teqhaj ikhuga ejh gaej kvaq sba skiesk lahr rk sbes er yku skkf ia nqki labcjh, iy nepa wkugh la mqarrah cjsk sba nqetqejs tqaaj gaevar wcsb aepb sbqurs.".upcase | |
input.split("").each do |character| | |
if position = CRYPTTEXT.find_index(character) | |
print PLAINTEXT[position] | |
else | |
print character | |
end | |
end and puts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh my!