6.1.7 Miscellaneous Functions

urandom( n)
Return a string of n random bytes suitable for cryptographic use.

This function returns random bytes from an OS-specific randomness source. The returned data should be unpredictable enough for cryptographic applications, though its exact quality depends on the OS implementation. On a UNIX-like system this will query /dev/urandom, and on Windows it will use CryptGenRandom. If a randomness source is not found, NotImplementedError will be raised. New in version 2.4.

See About this document... for information on suggesting changes.

79 accesses since 13 May 2009, HTML cache rendered at 20050330:0216