Rnd Class
Properties Methods Events Configuration Settings Errors
The Rnd class class is a basic provider of random number generation functionality.
Syntax
class secureblackboxlite.Rnd
Remarks
Use Rnd control to generate pseudo-random numbers or sequences. Methods like next_bytes and next_int return the next PRNG output, whereas seed_bytes or seed_int seed the generator with outside entropy.
It is a good idea to use one shared (singleton) Rnd object per process, as it helps spread the entropy across many part of the project, resulting in better and more secure randomization.
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
alphabet | Alphabet to use for random string generation. |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
config | Sets or retrieves a configuration setting. |
next_bytes | Generates an array of random bytes. |
next_int | Generates a random integer. |
next_pass | Generates a random password. |
next_string | Generates a random string of characters. |
randomize | Seeds the random generator with a system-originating input. |
seed_bytes | Seeds the generator with a data in a byte array. |
seed_int | Seeds the generator with an integer value. |
seed_string | Seeds the generator with a string value. |
seed_time | Seeds the generator with current time. |
Event List
The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.
on_error | Informs about errors during cryptographic operations. |
on_notification | This event notifies the application about an underlying control flow event. |
Configuration Settings
The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.