Dashboard Temp Share Shortlinks Frames API

HTMLify

encrypt_rot13.py
Views: 499 | Author: abh
1
2
3
4
5
6
7
8
9
def encrypt_rot13(text):
    cipher = ""
    for char in text:
        if char.isalpha():
            offset = 65 if char.isupper() else 97
            cipher += chr((ord(char) - offset + 13) % 26 + offset)
        else:
            cipher += char
    return cipher