SHA256 Support for version 3.10.1?
I started getting the following error with the upgrade to 3.10.1:
AttributeError: function/symbol 'SHA256_init' not found in library '/opt/conda/anaconda/lib/python3.6/site-packages/Crypto/Util/../Hash/_SHA256.cpython-36m-x86_64-linux-gnu.so': /opt/conda/anaconda/lib/python3.6/site-packages/Crypto/Util/../Hash/_SHA256.cpython-36m-x86_64-linux-gnu.so: undefined symbol: SHA256_init
Is anyone else getting this? Example code in pycryptodome/Doc/src/hash/sha256.rst will reproduce this error.
Those .so files are not distributed with the 3.10.1 wheel in pypi.
Is it correct that you compiled it on installation?
@Legrandin Yes, all I did was run the pip install.
Sorry, so you run pip install and the package got compiled? No wheels used?
Yes, that's correct.
Can you please provide the output of:
pip uninstall -y pycryptodome
pip install -v pycryptodome
I am getting the same error, but it works when I use SHA1 instead of 256. I am also trying to sign the data with PKCS1_v1_5 from Crypto.Signature
This problem still exists in version 3.12.0. EDIT: I think this only happens when both PyCrypto and pycryptodome are installed at the same time. Makes sense that this would cause issues.
I think this only happens when both PyCrypto and pycryptodome are installed at the same time. Makes sense that this would cause issues.
kindly noted that this answer is correct when i get the same error of AttributeError: function/symbol 'SHA256_init'
so how you guys fix it?
I solved it by uninstalling pycrypto.
pip3 uninstall pycrypto pip3 install pycryptodome
this should resolve the issue on macOS X