Simple Cryptography


Simple Coding/decoding applets

Here is some text encrypted with the shift scheme. What is the original text?

[i$xli$tistpi$sj$xli$Yrmxih$Wxexiw0$mr$svhiv$xs$jsvq$e$qsvi$tivjigx$yrmsr0$
iwxefpmwl$nywxmgi0$mrwyvi$hsqiwxmg$xveruympmx}0$tvszmhi$jsv$xli$gsqqsr$
hijirwi0$tvsqsxi$xli$kirivep${ipjevi0$erh$wigyvi$xli$fpiwwmrkw$sj$pmfivx}$
xs$syvwipziw$erh$syv$tswxivmx}0$hs$svhemr$erh$iwxefpmwl$xlmw$Gsrwxmxyxmsr$
jsv$xli$Yrmxih$Wxexiw$sj$Eqivmge2

Here is some text encryped with the substitution scheme. To make it a little simpler, only captial letters are used, and everything except letters is preserved. What is the original text?

QTLP QIE ZVYIQ CEXFAE DIAVPQOLP, TIEZ LNN QIAFRYI QIE IFRPE
ZFQ L DAELQRAE TLP PQVAAVZY, ZFQ ESEZ L OFRPE;
QIE PQFDMVZYP TEAE IRZY CG QIE DIVOZEG TVQI DLAE,
VZ IFJEP QILQ PQ. ZVDIFNLP PFFZ TFRNB CE QIEAE

Source Code

Create new BlueJ project. Create two classes: Shifter.java and Substituter.java. Get the source code below and copy it into the corresponding classes. Then fill in the missing method, compile and test.