Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
12
Task/Vigen-re-cipher/Sidef/vigen-re-cipher.sidef
Normal file
12
Task/Vigen-re-cipher/Sidef/vigen-re-cipher.sidef
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
func s2v(s) { s.uc.scan(/[A-Z]/)»ord»() »-» 65 };
|
||||
func v2s(v) { (v »%» 26 »+» 65)»chr»().join };
|
||||
|
||||
func blacken (red, key) { v2s(s2v(red) »+« s2v(key)) };
|
||||
func redden (blk, key) { v2s(s2v(blk) »-« s2v(key)) };
|
||||
|
||||
var red = "Beware the Jabberwock, my son! The jaws that bite, the claws that catch!";
|
||||
var key = "Vigenere Cipher!!!";
|
||||
|
||||
say red;
|
||||
say (var black = blacken(red, key));
|
||||
say redden(black, key);
|
||||
Loading…
Add table
Add a link
Reference in a new issue