IPWorks Encrypt 2020 JavaScript Edition

Questions / Feedback?

EzRand Class

Properties   Methods   Events   Configuration Settings   Errors  

The EzRand class can be used to generate random numbers or bytes using a variety of algorithms.

Syntax

ipworksencrypt.ezrand()

Remarks

The EzRand class 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 class with short descriptions. Click on the links for further details.

AlgorithmThe random number algorithm.
MaxThe exclusive upper bound.
MinThe inclusive lower bound.
RandBytesThe random byte array.
RandBytesLengthThe length of the byte array to be generated.
RandIntThe random integer.
SeedThe seed.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting.
GetNextBytesGenerates a sequence of random bytes.
GetNextIntGenerates a random integer.
ResetResets the class.

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.

ErrorInformation about errors during data delivery.

Configuration Settings


The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

OutputEncodingThe encoding applied to the generated bytes.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
UseInternalSecurityAPITells the class whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Encrypt 2020 JavaScript Edition - Version 20.0 [Build 8262]