Home | Trees | Index | Help |
---|
Module dnet :: Class rand |
|
object
--+
|
rand
rand() -> Pseudo-random number generator Obtain a handle for fast, cryptographically strong pseudo-random number generation. The starting seed is derived from the system random data source device (if one exists), or from the current time and random stack contents.
Method Summary | |
---|---|
x.__init__(...) initializes x; see x.__class__.__doc__ for signature... | |
T.__new__(S, ...) -> a new object with type S, a subtype of T... | |
Add additional entropy into the PRNG mix. | |
Return a string of random bytes. | |
Initialize the PRNG from a known seed. | |
Return a random 16-bit integer. | |
Return a random 32-bit integer. | |
Return a random 8-bit integer. | |
xrange object |
Return a random permutation iterator to walk an unsigned integer range, like xrange(). |
Inherited from object | |
x.__delattr__('name') <==> del x.name... | |
x.__getattribute__('name') <==> x.name... | |
x.__hash__() <==> hash(x)... | |
helper for pickle... | |
helper for pickle... | |
x.__repr__() <==> repr(x)... | |
x.__setattr__('name', value) <==> x.name = value... | |
x.__str__() <==> str(x)... |
Method Details |
---|
__init__(...)
|
__new__(T, S, ...)T.__new__(S, ...) -> a new object with type S, a subtype of T
|
add(...)Add additional entropy into the PRNG mix. Arguments: string -- binary string |
get(...)Return a string of random bytes. Arguments: len -- number of random bytes to generate |
set(...)Initialize the PRNG from a known seed. Arguments: string -- binary string seed value |
uint16(...)Return a random 16-bit integer. |
uint32(...)Return a random 32-bit integer. |
uint8(...)Return a random 8-bit integer. |
xrange(start=..., stop)Return a random permutation iterator to walk an unsigned integer range, like xrange().
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Thu Jan 19 13:24:12 2006 | http://epydoc.sf.net |