📜  python ascii 凯撒密码 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:08.377000             🧑  作者: Mango

代码示例1
def ascii_caesar_shift(message, distance):
    encrypted = ""
    for char in message:
        value = ord(char) + distance
        encrypted += chr(value % 128) #128 for ASCII
    return encrypted