from Crypto.Cipher import AES
key = b'Sixteen byte key'
cipher = AES.new(key, AES.MODE_EAX)
nonce = cipher.nonce
ciphertext, tag = cipher.encrypt_and_digest(data)
这是我的代码,我正试图从加密导入AES。密码,但显示此错误。
这应该可以解决您的问题:
pip install pycryptodome