I have installed pycryptodomex module on python 3.6.5 but when i try to execute the below call, i get the error mentioned in the headline
from Crypto.Cipher import AES
I want to encrypt a file using AES. How to proceed now ?
It's the same code, just different names. pycryptodome has some association to pyCrypto and can be considered a drop in replacement when migrating from PyCrypto to PyCryptodome.
>> pip install pycryptodome
from Crypto.Cipher import AES #Works
or
>> pip install pycryptodomex
from Cryptodome.Cipher import AES
For python3 the package name is now pycryptodome or pycryptodomex
If you need compatibility with your project with Python2 use pycryptodome or else use pycryptodomex which is a library independent of the old PyCrypto.
hello i had the same problem: _an almost drop-in replacement for the old PyCrypto library. You install it with:
$ pip install pycryptodome ((3.8.2)) or the latest version go to this directory : 2) [C:\Users\s****\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\crypto]
here try to change the file name crypto to Crypto with upper case C because they import it as Crypto in every package. it works for me, good luck :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With