Caesar cipher: Difference between revisions
Content added Content deleted
Cyril Nocton (talk | contribs) |
Cyril Nocton (talk | contribs) |
||
Line 1,890: | Line 1,890: | ||
> (caesar-decipher "Qeb nrfzh yoltk clu grjmp lsbo qeb ixwv ald" 23) |
> (caesar-decipher "Qeb nrfzh yoltk clu grjmp lsbo qeb ixwv ald" 23) |
||
"The quick brown fox jumps over the lazy dog"</pre> |
"The quick brown fox jumps over the lazy dog"</pre> |
||
====W/o |
====W/o decyphering function==== |
||
1. Note |
1. Note |
||
<pre>if rot(text shift) = cyphertext then rot(cyphertext -shift) = text</pre> |
<pre>if rot(text shift) = cyphertext then rot(cyphertext -shift) = text</pre> |
||
Line 1,896: | Line 1,896: | ||
2. Program |
2. Program |
||
Text manipulation is a |
Text manipulation is a tricky. Requiescat in pace. |
||
<lang lisp>(defconstant +rot+ "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz") |
<lang lisp>(defconstant +rot+ "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz") |