Pycrypto And Python 2.4.3 Issue
I am working on a project and the cPanel which is provided to me by employer is having python 2.4.3 (too old version). The problem is i need to use pycrypto. So i am importing SHA2
Solution 1:
Quite a few algorithms in PyCrypto are actually written in C, rather than in pure python. SHA256 is amongst them. In order to use it, you must either install a complete pycrypto binary package or follow the instructions in the PyCrypto's README file. In the latter case, you will need to install the development environment first.
Both options are platform and OS specific, but once done, it will be simply a matter of calling:
from Crypto.Hash import SHA256
hash = SHA256.new()
hash.update('message')
There is no need to try to import it from hashlib
first.
Solution 2:
You could try using the standalone hashlib library.
Post a Comment for "Pycrypto And Python 2.4.3 Issue"