wes d2a2ba9e15 first commit %!s(int64=4) %!d(string=hai) anos
..
README.md d2a2ba9e15 first commit %!s(int64=4) %!d(string=hai) anos
code.cpp d2a2ba9e15 first commit %!s(int64=4) %!d(string=hai) anos
unitTest.cpp d2a2ba9e15 first commit %!s(int64=4) %!d(string=hai) anos

README.md

Atbash Cipher

by Matt tags: strings, formatting, cryptography

Summary

The Atbash cipher is an encryption method in which each letter of a word is replaced with its "mirror" letter in the alphabet: A Z; B Y; C X; etc. Create a function that takes a string and applies the Atbash cipher to it. Examples atbash("apple") ➞ "zkkov" atbash("Hello world!") ➞ "Svool dliow!" atbash("Christmas is the 25th of December") ➞ "Xsirhgnzh r

Instructions

The Atbash cipher is an encryption method in which each letter of a word is replaced with its "mirror" letter in the alphabet: A <=> Z; B <=> Y; C <=> X; etc.

Create a function that takes a string and applies the Atbash cipher to it.

Examples

atbash("apple") ➞ "zkkov"

atbash("Hello world!") ➞ "Svool dliow!"

atbash("Christmas is the 25th of December") ➞ "Xsirhgnzh rh gsv 25gs lu Wvxvnyvi"

Notes

  • Capitalisation should be retained.
  • Non-alphabetic characters should not be altered.