atbashEncrypt

Atbash cipher is one of the oldest ciphers known. It is a substitution cipher which works by reversing the alphabet. For instance, "AZ" would become "ZA" and so on.

The encryption method creates a reversed list from the original latin alphabet. The letters are then substituted by finding out their index in the original list and replacing the letter with the one with the same index from the reversed list.

Decrypting works the same way, just with the lists in a different order.