summaryrefslogtreecommitdiffstats
path: root/django_authopenid
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2009-07-26 22:33:32 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2009-07-26 22:33:32 -0400
commitb970ecb275ab508d0158f0ebad60c4bd31178a33 (patch)
treedb94fc2e3af7c23fdced6b48768283b9ca8f1019 /django_authopenid
parent7333702e364b6273821d8cbc545e5adb3382ad4f (diff)
downloadaskbot-b970ecb275ab508d0158f0ebad60c4bd31178a33.tar.gz
askbot-b970ecb275ab508d0158f0ebad60c4bd31178a33.tar.bz2
askbot-b970ecb275ab508d0158f0ebad60c4bd31178a33.zip
merged in latest Mikes changes
Diffstat (limited to 'django_authopenid')
-rw-r--r--django_authopenid/models.py4
-rw-r--r--django_authopenid/util.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/django_authopenid/models.py b/django_authopenid/models.py
index 9826c452..e6fb8111 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 md5, random, sys, os, time
+import hashlib, 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 = md5.new("%s%s%s%s" % (
+ confirm_key = hashlib.md5("%s%s%s%s" % (
random.randint(0, sys.maxint - 1), os.getpid(),
time.time(), settings.SECRET_KEY)).hexdigest()
try:
diff --git a/django_authopenid/util.py b/django_authopenid/util.py
index 841a81c7..54c1246b 100644
--- a/django_authopenid/util.py
+++ b/django_authopenid/util.py
@@ -15,7 +15,7 @@ try:
except:
from yadis import xri
-import time, base64, md5, operator
+import time, base64, hashlib, operator
import urllib
from models import Association, Nonce
@@ -128,7 +128,7 @@ class DjangoOpenIDStore(OpenIDStore):
def getAuthKey(self):
# Use first AUTH_KEY_LEN characters of md5 hash of SECRET_KEY
- return md5.new(settings.SECRET_KEY).hexdigest()[:self.AUTH_KEY_LEN]
+ return hashlib.md5(settings.SECRET_KEY).hexdigest()[:self.AUTH_KEY_LEN]
def isDumb(self):
return False