| Home | Trees | Indices | Help |
|
|---|
|
|
This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
This file specifically includes utilities for security.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
ctokens =
|
|||
|
|||
This function and the web2py_uuid follow from the following discussion: http://groups.google.com/group/web2py-developers/browse_thread/thread/7fd5789a7da3f09 At startup web2py compute a unique ID that identifies the machine by adding uuid.getnode() + int(time.time() * 1e3) This is a 48bits number. It converts the number into 16x8bits tokens. It uses thie unique if to initilize the entropy source ('/dev/urandom') or to seed random. If os.random() is not supported, it falls back to using random and issues a warning. |
This function follows from the following discussion: http://groups.google.com/group/web2py-developers/browse_thread/thread/7fd5789a7da3f09 It works like uuid.uuid4 exxcept that tries to use os.urandom() if possible And it XORs the output with the tokens uniquely associated to this machine. |
|
|||
ctokens
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Fri Jun 3 16:11:28 2011 | http://epydoc.sourceforge.net |