#!/usr/bin/runghc import CaesarCipher import Data.List caesarHacker :: String -> [(Int, String)] caesarHacker message = [(key, decryptString key message) | key <- [0 .. 65]] main :: IO () main = do let message = "All human beings have three lives: public, private, and secret. Gabriel Garcia Marquez" let key = 13 putStrLn "Your encrypted message is:" putStrLn (encryptString key message) putStrLn "Your cracked ciphertext is:" putStrLn (intercalate "\n" (map show (caesarHacker (encryptString key message))))