Caesar Cipher

This code allows us to input a text and try either one specific cipher, or try all 26 to decode.

shifter[input_,shift_] := Module[{},
temp = Mod[(ToCharacterCode[input][[1]] - 65) + shift,26]+65;
temp = FromCharacterCode[temp];
Return[temp];
];

(* in the code below, if you choose checkall = 1 then it only does one specific shift; if you have checkall = 26 it outputs all of them *)
caesarcrypt[data_,theshift_,checkall_] := Module[{},
For[m = 0, m ≤ checkall-1, m++,
{
tempdata = Characters[data];
codeddata = {};
For[n = 1, n ≤ Length[tempdata], n++, codeddata = AppendTo[codeddata, shifter[tempdata[[n]],theshift+m]]];
Print[StringJoin[codeddata]];
}];
If[checkall == 1, Return[StringJoin[codeddata]]]
];

caesarcrypt["VUSFHJHLZHYJPWOLYPHTKPZHWWVPUALKIFL",0,26]

caesarcrypt["HELLOCRYTPOCLASSTHEKEYWORDFORTHEFIRSTMESSAGEISKAYLA",3,1]

reverse[inputtext_] := Module[{},
tempdata = Characters[inputtext];
size = Length[tempdata];
tempoutput = {};
For[n = 1, n ≤ size, n++, tempoutput = AppendTo[tempoutput, tempdata[[size+1-n]]]];
Return[StringJoin[tempoutput]];
]

reverse["FFFRRR"]

caesarcrypt["HILOUXRBQLHPLWHPRVJQLKWHPRVURISXGRRWVHYXRBVQDHPWDKWGRRJVHLPHQHHYDKXRBHWRXTKWALVVHLOIRGUDXJBGREDBEGHGQHWWDHEVBDZODGOXRKVHKVWDKWVXRLFHUSRVVLKWXUWHPLWUDZQLHQLPIRHWLURYDIDVLHWRXTKWILIVQRPPRFIRHVXRKHKWQLOLYHGHKWRWHFQHUHIHUHOEDURYDIDWVDHOWDHNDPGOXRZLOOHKGHGDYQLUHOWLKILHWRXTKWUXRIWKJXDWJQLHEHNLOVBDZODWRQRGLKJXRKWODQUDHORWBGDHUVBDZODPDLHWRXTGULKWSXHYLJUHYHQUHYHQUHYHQHWRXTGQRFHVJQLRJSHHNOOHKKJXRUKWJQLRJHUXRBILHWRXTWVULIOOLKFUXKFQRWVQLZPRUIHUDPRGVLZI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