EzRand Component
Properties Methods Events Configuration Settings Errors
The EzRand component can be used to generate random numbers or bytes using a variety of algorithms.
Syntax
TipcEzRand
Remarks
The EzRand component can be used to generate random numbers or bytes using a variety of algorithms and implementations.
To begin first set the Algorithm property to the desired value. This property specifies the algorithm and implementation that will be used to generate the number or bytes. Possible choices include ISAAC, the Microsoft Crypto API, and platform specific random and secure random implementations.
Next set Min and Max to define the acceptable range of values when generating an integer. The Seed property may optionally be set. Then simply call GetNextInt to generate a random number. the RandInt property will be populated with the generated value.
To generate a random set of bytes set RandBytesLength to the desired number of bytes and call GetNextBytes.
Property List
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
Algorithm | The random number algorithm. |
Max | The exclusive upper bound. |
Min | The inclusive lower bound. |
RandBytes | The random byte array. |
RandBytesLength | The length of the byte array to be generated. |
RandInt | The random integer. |
Seed | The seed. |
Method List
The following is the full list of the methods of the component with short descriptions. Click on the links for further details.
Config | Sets or retrieves a configuration setting. |
GetNextBytes | Generates a sequence of random bytes. |
GetNextInt | Generates a random integer. |
Reset | Resets the component. |
Event List
The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.
Error | Information about errors during data delivery. |
Configuration Settings
The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.
OutputEncoding | The encoding applied to the generated bytes. |
BuildInfo | Information about the product's build. |
CodePage | The system code page used for Unicode to Multibyte translations. |
LicenseInfo | Information about the current license. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |