Skip to content

Instantly share code, notes, and snippets.

@benrules2
Last active September 27, 2018 01:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benrules2/f70742b48bbe8263d364ad6d0952a1fb to your computer and use it in GitHub Desktop.
Save benrules2/f70742b48bbe8263d364ad6d0952a1fb to your computer and use it in GitHub Desktop.
Shift Cipher
class ShiftCipher:
def __init__(self, N = 13):
self.original_alphabet = ["a","b","c","d","e","f","g","h","i","j","k","l","m",
"n","o","p","q","r","s","t","u","v","w","x","y","z"]
self.cipher_alphabet = self.original_alphabet[N:]
self.cipher_alphabet.extend(self.original_alphabet[0:N])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment