A substitution cipher is a simple way to obfuscate a string, by replacing the letters, given a mapping. For example:
{
"cipher": "zyxwvutsrqponmlkjihgfedcba",
"alphabet": "abcdefghijklmnopqrstuvwxyz"
}
Each letter in the cipher replaces the corresponding letter in the alphabet. So a word like abs
becomes zyf
.
Input:
{
"text": "Hello, folks!",
"cipher": "zyxwvutsrqponmlkjihgfedcba"
}
Output: Svool, uloph!