[Zodb-checkins] CVS: ZODB3/ZEO/auth - auth_digest.py:1.1.2.2

Sidnei da Silva sidnei at x3ng.com.br
Thu May 15 10:46:43 EDT 2003


Update of /cvs-repository/ZODB3/ZEO/auth
In directory cvs.zope.org:/tmp/cvs-serv4364/ZEO/auth

Modified Files:
      Tag: ZODB3-auth-branch
	auth_digest.py 
Log Message:
If we take an argument, lets use it!

=== ZODB3/ZEO/auth/auth_digest.py 1.1.2.1 => 1.1.2.2 ===
--- ZODB3/ZEO/auth/auth_digest.py:1.1.2.1	Tue May 13 16:42:59 2003
+++ ZODB3/ZEO/auth/auth_digest.py	Thu May 15 09:46:41 2003
@@ -43,13 +43,13 @@
 from ZEO.auth.storage import AuthZEOStorage
 from ZEO.auth.database import Database
 
-def get_random_bytes(n):
+def get_random_bytes(n=8):
     if os.path.exists("/dev/urandom"):
         f = open("/dev/urandom")
-        s = f.read(8)
+        s = f.read(n)
         f.close()
     else:
-        L = [chr(random.randint(0, 255)) for i in range(8)]
+        L = [chr(random.randint(0, 255)) for i in range(n)]
         s = "".join(L)
     return s
 




More information about the Zodb-checkins mailing list