Created
November 4, 2019 13:15
-
-
Save markodayan/6d0245da44d78488fb9407aaab35334b to your computer and use it in GitHub Desktop.
Rot13 Encoder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Python Rot13 Encoder | |
password = input("Enter string to encrypt with Rot13:\n") | |
# Using the str.maketrans to make a translation key | |
# Could apply the rot13 encoding scheme | |
rot13 = str.maketrans( | |
"ABCDEFGHIJKLMabcdefghijklmNOPQRSTUVWXYZnopqrstuvwxyz", | |
"NOPQRSTUVWXYZnopqrstuvwxyzABCDEFGHIJKLMabcdefghijklm") | |
print(str.translate(password, rot13)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment