0

I need to create a SHA256 hash in Python 2.2, but a don't found any way to do this. All I found is for Python 2.4 or higher.

Anyone has a ideia to how I can do this?

  • Does it have to be pure Python or could you call an external executable? – Jason Sperske Apr 06 '16 at 16:50
  • 1
    Also have you looked at https://github.com/thomdixon/pysha2? It's a pure Python implementation of sha256 for pre-hashlib Python (I haven't tested 2.2 yet) – Jason Sperske Apr 06 '16 at 16:55
  • Jason, I try but don't work. It depends to _sha256 I make a jar to create the hash, but it ins't the best way for the system – Hebert Souza Apr 06 '16 at 21:01
  • That is a local dependency, the sha256.py (https://github.com/thomdixon/pysha2/blob/master/sha2/sha256.py) class itself only depends on `copy, struct, sys` and it's use of `struct` doesn't use the Python 2.5 methods like `unpack_from` – Jason Sperske Apr 06 '16 at 21:20

0 Answers0