Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Decipher a string enciphered by the rail fence cipher
ResourceFunction["RailFenceDecipher"][string,n] deciphers string, enciphered using the rail fence cipher with n rails. |
Decipher a string using the rail fence cipher with 3 rails:
In[1]:= | ![]() |
Out[1]= | ![]() |
The rail fence cipher is a transposition cipher, that is, the characters are scrambled rather than replaced:
In[2]:= | ![]() |
Out[3]= | ![]() |
The first character is not moved:
In[4]:= | ![]() |
Out[5]= | ![]() |
Try using a varying number of rails to find the right number of rails:
In[6]:= | ![]() |
Out[6]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License