Skip to content

Instantly share code, notes, and snippets.

@msepcot
Created December 7, 2018 20:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msepcot/edd604bc605967a2ccd5bc6b484a31aa to your computer and use it in GitHub Desktop.
Save msepcot/edd604bc605967a2ccd5bc6b484a31aa to your computer and use it in GitHub Desktop.
The Fated Sky: A Lady Astronaut Novel, Chapter 16 cypher text.
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
@distrakt
Copy link

Oh my!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment