Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Substitution-cipher/PicoLisp/substitution-cipher.l
Normal file
19
Task/Substitution-cipher/PicoLisp/substitution-cipher.l
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
(setq *A (chop "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"))
|
||||
(setq *K (chop "VsciBjedgrzyHalvXZKtUPumGfIwJxqOCFRApnDhQWobLkESYMTN"))
|
||||
|
||||
(de cipher (Str D)
|
||||
(let (K *K A *A)
|
||||
(and D (xchg 'A 'K))
|
||||
(pack
|
||||
(mapcar
|
||||
'((N)
|
||||
(or
|
||||
(pick
|
||||
'((A K) (and (= A N) K))
|
||||
A
|
||||
K )
|
||||
N ) )
|
||||
(chop Str) ) ) ) )
|
||||
(and
|
||||
(println 'encode (cipher "The quick brown fox jumped over the lazy dog's back"))
|
||||
(println 'decode (cipher @ T)) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue