Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Encipher a string using the Atbash cipher
ResourceFunction["AtbashCipher"][string] enciphers or deciphers string using the Atbash cipher. | |
ResourceFunction["AtbashCipher"][string,{c1,c2,…}] enciphers or deciphers string using the alphabet ci. | |
ResourceFunction["AtbashCipher"][string,{{c1,1,c1,2,…},{c2,1,c2,2,…},…}] enciphers or deciphers string using the alphabets ci. |
Encipher a string:
In[1]:= |
Out[1]= |
Encipher a sentence:
In[2]:= |
Out[2]= |
Encipher the Hebrew word for "sun":
In[3]:= |
Out[3]= |
AtbashCipher automatically threads over lists of strings:
In[4]:= |
Out[4]= |
Use a custom collation (ordering) of an alphabet:
In[5]:= |
Out[6]= |
The function is still its own inverse:
In[7]:= |
Out[7]= |
Define an Atbash cipher for the Greek alphabet:
In[8]:= |
Out[8]= |
Use several alphabets: the standard lower case alphabet, the uppercase alphabet and the numbers. Each of which will get "inverted" in the Atbash cipher:
In[9]:= |
Out[9]= |
AtbashCipher is an involutory function, i.e. it is its own inverse:
In[10]:= |
Out[10]= |
Spaces, numbers and letters outside the regular English alphabet are not transformed:
In[11]:= |
Out[11]= |
Use RemoveDiacritics, StringDelete, IntegerName, and ToLowerCase to transform the message:
In[12]:= |
Out[12]= |
Enciphering the transformed message results in a much harder to crack cipher:
In[13]:= |
Out[13]= |
Find English words that encipher to another English word:
In[14]:= |
Out[19]= |
This work is licensed under a Creative Commons Attribution 4.0 International License