lefthandpath
lefthandpath

Reputation: 63

Generating SHA-256 hash in Python 2.4 using M2Crypto

Is it possible to generate a SHA-256 hash using M2Crypto? Python 2.4's SHA module doesn't support 256, so I started using PyCrypto, only to find out that PyCrypto doesn't support PKCS#5 (needed elsewhere in my project.) I switched to M2Crypto as a result and now I would like to replace my PyCrypto SHA-256 call with an M2Crypto equivalent... I tried looking in the unit tests, but didn't see anything.

Upvotes: 3

Views: 1364

Answers (1)

ChristopheD
ChristopheD

Reputation: 116137

You could download the hashlib module of Python 2.5 (supports SHA256) for usage on older Pythons (e.g. Python 2.4).

Upvotes: 6

Related Questions