diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2009-07-10 19:11:34 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2009-07-10 19:11:34 -0400 |
commit | bb801f2bbd9f26bebca846b71e8947a1951f86a5 (patch) | |
tree | cd4f7417cdbabc6834aeb45f73f09208a738ac2d /django_authopenid/models.py | |
parent | d3b7efc1eba6f38fba8d5110c7155f477d1459e6 (diff) | |
download | askbot-bb801f2bbd9f26bebca846b71e8947a1951f86a5.tar.gz askbot-bb801f2bbd9f26bebca846b71e8947a1951f86a5.tar.bz2 askbot-bb801f2bbd9f26bebca846b71e8947a1951f86a5.zip |
english translation
Diffstat (limited to 'django_authopenid/models.py')
-rw-r--r-- | django_authopenid/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django_authopenid/models.py b/django_authopenid/models.py index e6fb8111..9826c452 100644 --- a/django_authopenid/models.py +++ b/django_authopenid/models.py @@ -3,7 +3,7 @@ from django.conf import settings from django.contrib.auth.models import User from django.db import models -import hashlib, random, sys, os, time +import md5, random, sys, os, time __all__ = ['Nonce', 'Association', 'UserAssociation', 'UserPasswordQueueManager', 'UserPasswordQueue'] @@ -47,7 +47,7 @@ class UserPasswordQueueManager(models.Manager): # The random module is seeded when this Apache child is created. # Use SECRET_KEY as added salt. while 1: - confirm_key = hashlib.md5("%s%s%s%s" % ( + confirm_key = md5.new("%s%s%s%s" % ( random.randint(0, sys.maxint - 1), os.getpid(), time.time(), settings.SECRET_KEY)).hexdigest() try: |