1

我正在使用 Cryptography Fernet 进行加密和解密。数据加密后,长度很大,有什么办法可以减少或限制它的长度?

示例:gAAAAABgUZeX2ffM7H07MfyZ2FGPj2xPSPbN0r3rQ1BzfKHsJ7QFUOgsqoOjOAh6Ksq-9fDCrLxb32g0NPbbU6F7lZeSk7Xfgj-2vHHtTjxd3rj02qWGoaQ=

def encrypt(message):
    encoded_message = message.encode()
    f = Fernet(app.config['SECRET_KEY'])
    encrypted_message = f.encrypt(encoded_message)

    return encrypted_message.decode()
4

0 回答 0