The arc4random module allows the user to generate a specified amount of random information. See arc4random(3) for more information.
The following example retrieves 1024 bytes of random information.
import openbsd x = openbsd.arc4random.getbytes(1024)
The arc4random random module exposes a single function, taking one argument - the number of bytes of data to be generated. The data is returned as a Python string.
<--previous | contents | next--> | (12/21/04) |