SecureRandomGen

Mon 01 January 2018

Syntax

SecureRandomGen([num][, bytes])

Description

Use the SecureRandomGen function to generate one or more cryptographically secure pseudo-random number generator (CSPRNG) values. For example, a CSPRNG value can be used as a salt to then generate a hashed (or “salted”) string, such as a hashed password.

Note: Because SecureRandomGen is based on the Java security SecureRandom function, it is more efficient to call it once to return an array of required salt values than it is to call it for each salt value required.

Parameters

Field or Control

Definition

num

Specifies the number of random numbers to generate. If this value is not specified, one random number is generated.

bytes

Specifies the size of each random number in bytes. If this value is less than 1 or not specified, the default is 16 bytes (128 bits).

Returns

An array of string.