google-code-export / django-simple-captcha

Automatically exported from code.google.com/p/django-simple-captcha
MIT License
0 stars 0 forks source link

Not supported hash type sha #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In the models.py file in line 33 should be replaced:
self.hashkey = hashlib.new ('sha', key_). hexdigest ()

on

self.hashkey = hashlib.new ('sha1', key_). hexdigest ()

I understand that this is due to update the library hashlib

Original issue reported on code.google.com by apocale...@gmail.com on 28 Sep 2010 at 12:23

GoogleCodeExporter commented 9 years ago
What version of pyton are you running? On which OS?

Original comment by mbonetti on 28 Sep 2010 at 1:41

GoogleCodeExporter commented 9 years ago
Python 2.7, OS Debian Lenny

Original comment by apocale...@gmail.com on 28 Sep 2010 at 3:15

GoogleCodeExporter commented 9 years ago
Well, I couldn't really reproduce this, as my Python 2.7's hashlib seems to 
support the sha algorithm, but as it is no longer listed in the documentation I 
followed your suggestion and switched to sha1. (In r58)

Original comment by mbonetti on 6 Oct 2010 at 1:27