Back to index

plone3  3.1.7
util.py
Go to the documentation of this file.
00001 import random
00002 
00003 def GenerateSecret(length=16):
00004     letters ="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
00005     letters+="abcdefghijklmnopqrstuvwxyz"
00006     letters+="01234567890!@#$%^&*()"
00007 
00008     secret=""
00009     for i in range(length):
00010         secret+=random.choice(letters)
00011 
00012     return secret
00013 
00014     
00015