Cipher CTF Challenge Generator (Malespin cipher)Press the blue button to regenerate a challenge. This page will generate a Malespin cipher challenge. It is thought that Francisco Malespin used this cipher in the 19th century. |
Coding
The basic coding in C# is:
public static string getMalespin(string s) { s = s.ToLower(); string rtn = ""; string mapping = "etcdagfhojklmnipqrsbuvwxz"; foreach (char ch in s) { var c = ch - 'a'; try { if (ch >= 'a' && ch <= 'z') rtn = rtn + mapping[c]; else rtn = rtn + ch; } catch (Exception ex) { } } return (rtn); }