使用Crypto实现对称加密 导入第三方库 pip install pycryptodome 代码: # 需要导入库 pip install pycryptodome from Crypto.Cipher import AES from binascii import b2a_hex, a2b_hex from Crypto import Random class AesEncryption(