"Evan Monroig" <[EMAIL PROTECTED]> writes: > 'p' wrote: > > Given that you do this: > > self._secretToken= sha.new(str(time.time())).hexdigest() > > Hi, > > if you really do this in Turbogears, then it is possible to reproduce > the hash if you approximately know the time when it was generated... > Wouldn't it be possible to use some kind of more random function for > that ?
Or at least use datetime instead of time, since it goes down to microseconds resolution? This should at least be harder to guess... >>> datetime.datetime.now() datetime.datetime(2005, 12, 3, 11, 1, 18, 842567) > I know that php has a function 'uniqueid' for this purpose, but I > haven't hanged around in python enough to know anything equivalent... What's the implementation of uniqueid? Some random number? -- Jorge Godoy <[EMAIL PROTECTED]>

