Back to index

plone3  3.1.7
Functions
plone.openid.util Namespace Reference

Functions

def GenerateSecret

Function Documentation

def plone.openid.util.GenerateSecret (   length = 16)

Definition at line 3 of file util.py.

00003 
00004 def GenerateSecret(length=16):
00005     letters ="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
00006     letters+="abcdefghijklmnopqrstuvwxyz"
00007     letters+="01234567890!@#$%^&*()"
00008 
00009     secret=""
00010     for i in range(length):
00011         secret+=random.choice(letters)
00012 
00013     return secret
00014 
00015     
00016