[Zodb-checkins] SVN: ZODB/trunk/src/ZEO/tests/auth_plaintext.py adjusted test to ZEO.hash
Andreas Jung
andreas at andreas-jung.com
Mon Mar 30 19:48:02 EDT 2009
Log message for revision 98660:
adjusted test to ZEO.hash
Changed:
U ZODB/trunk/src/ZEO/tests/auth_plaintext.py
-=-
Modified: ZODB/trunk/src/ZEO/tests/auth_plaintext.py
===================================================================
--- ZODB/trunk/src/ZEO/tests/auth_plaintext.py 2009-03-30 23:46:50 UTC (rev 98659)
+++ ZODB/trunk/src/ZEO/tests/auth_plaintext.py 2009-03-30 23:48:02 UTC (rev 98660)
@@ -19,14 +19,14 @@
is provided by not storing plaintext passwords on disk.
"""
-import sha
+from ZEO.hash import sha1
from ZEO.StorageServer import ZEOStorage
from ZEO.auth import register_module
from ZEO.auth.base import Client, Database
def session_key(username, realm, password):
- return sha.new("%s:%s:%s" % (username, realm, password)).hexdigest()
+ return sha1("%s:%s:%s" % (username, realm, password)).hexdigest()
class StorageClass(ZEOStorage):
@@ -36,7 +36,7 @@
except LookupError:
return 0
- password_dig = sha.new(password).hexdigest()
+ password_dig = sha1(password).hexdigest()
if dbpw == password_dig:
self.connection.setSessionKey(session_key(username,
self.database.realm,
More information about the Zodb-checkins
mailing list