Sha256: c19a769d6c903a209e4660f5d3ca05bb3d613ec27dd2523652abf39262a189d3

Contents?: true

Size: 885 Bytes

Versions: 6

Compression:

Stored size: 885 Bytes

Contents

#!/usr/bin/env ruby

# C O D E X  D E C R Y P T

puts "Enter that you have been trusted with."

codex = gets

puts "For your eyes only:" + "\n"

def decrypt(codex)
  transformer = {
    "2" => "a",
    "i" => "b",
    "b" => "c",
    "z" => "d",
    "0" => "e",
    "h" => "f",
    "a" => "g",
    "7" => "h",
    "x" => "i",
    "3" => "j",
    "q" => "k",
    "c" => "l",
    "g" => "m",
    "1" => "n",
    "6" => "o",
    "m" => "p",
    "r" => "q",
    "p" => "r",
    "5" => "s",
    "l" => "t",
    "9" => "u",
    "e" => "v",
    "v" => "w",
    "y" => "x",
    "w" => "y",
    "d" => "z",
    "8" => ".",
    "n" => ",",
    "f" => "?",
    "u" => "\(",
    "k" => "\)",
    "t" => "\"",
    "o" => ":",
    "s" => "$",
    "j" => "\'",
    "4" => " ",
  }
  decryption = codex.downcase.split(" ").join("")
  puts decryption.gsub(/\S/, transformer).upcase
end

decrypt(codex)

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
codex_vitae-0.6.0 codex_decrypt
codex_vitae-0.5.0 codex_decrypt
codex_vitae-0.4.0 codex_decrypt
codex_vitae-0.3.0 codex_decrypt
codex_vitae-0.2.0 codex_decrypt
codex_vitae-0.1.0 codex_decrypt