Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,11 @@
|
|||
SeedRandom[1234];
|
||||
a=Characters@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ";
|
||||
map=Thread[a->RandomSample[a]];
|
||||
ClearAll[SubstitutionCipherEncode,SubstitutionCipherDecode]
|
||||
SubstitutionCipherEncode[input_String,map_]:=StringReplace[input,map]
|
||||
SubstitutionCipherDecode[input_String,map_]:=StringReplace[input,Reverse/@map]
|
||||
|
||||
str="The quick brown fox jumps over the lazy dog,who barks VERY loudly!";
|
||||
encoded=SubstitutionCipherEncode[str,map]
|
||||
decoded=SubstitutionCipherDecode[encoded,map]
|
||||
str===decoded
|
||||
Loading…
Add table
Add a link
Reference in a new issue