use static character list
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@1890 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
1d0904ec05
commit
78f0320c57
1 changed files with 1 additions and 3 deletions
|
@ -25,8 +25,6 @@ $Id$
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
|
||||||
bits = 128
|
|
||||||
|
|
||||||
charList = ([chr(i) for i in range(48, 58)]
|
charList = ([chr(i) for i in range(48, 58)]
|
||||||
+ [chr(i) for i in range(97, 123)]
|
+ [chr(i) for i in range(97, 123)]
|
||||||
+ [chr(i) for i in range(65, 91)]
|
+ [chr(i) for i in range(65, 91)]
|
||||||
|
@ -34,7 +32,7 @@ charList = ([chr(i) for i in range(48, 58)]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def generateName(check=None, lowerCaseOnly=False, bits=bits, seed=None, base=62):
|
def generateName(check=None, lowerCaseOnly=False, bits=128, base=62, seed=None):
|
||||||
""" Generates an unguessable random name.
|
""" Generates an unguessable random name.
|
||||||
"""
|
"""
|
||||||
if base > 64:
|
if base > 64:
|
||||||
|
|
Loading…
Add table
Reference in a new issue