2
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)

This is my code, I'm trying to import AES from Crypto.Cipher, but shows this error.

1 Answers1

1

This should resolve your issue:

pip install pycryptodome