Mercurial > moin > 1.9
diff MoinMoin/util/moinoid.py @ 6103:500f68d3e2fd
remove our own usage of python_compatibility module
author | Thomas Waldmann <tw AT waldmann-edv DOT de> |
---|---|
date | Tue, 06 Sep 2016 01:00:25 +0200 |
parents | 817d99d715fe |
children |
line wrap: on
line diff
--- a/MoinMoin/util/moinoid.py Tue Sep 06 00:26:46 2016 +0200 +++ b/MoinMoin/util/moinoid.py Tue Sep 06 01:00:25 2016 +0200 @@ -4,7 +4,7 @@ @copyright: 2006, 2007 Johannes Berg <johannes@sipsolutions.net> @license: GNU GPL, see COPYING for details. """ - +import hashlib from random import randint import time @@ -14,7 +14,6 @@ from openid.store import nonce from MoinMoin import caching -from MoinMoin.support.python_compatibility import hash_new from MoinMoin import log logging = log.getLogger(__name__) @@ -53,7 +52,7 @@ def key(self, url): '''return cache key''' - return hash_new('sha1', url).hexdigest() + return hashlib.new('sha1', url).hexdigest() def storeAssociation(self, server_url, association): ce = caching.CacheEntry(self.request, 'openid', self.key(server_url), @@ -104,7 +103,7 @@ def useNonce(self, server_url, timestamp, salt): val = ''.join([str(server_url), str(timestamp), str(salt)]) - csum = hash_new('sha1', val).hexdigest() + csum = hashlib.new('sha1', val).hexdigest() ce = caching.CacheEntry(self.request, 'openid-nonce', csum, scope='farm', use_pickle=False) if ce.exists():