Generates a random salt value (a random series of bytes) of a specified size as a RAW value.

This salt value can be used when generating a hashed password with the GENERATE-PASSWORD-HASH function or changing the PASSWORD-HASH-SALT attribute.

Syntax

GENERATE-SALT( [ size ] )
size
An optional INTEGER expression specifying the size of the salt, ranging from 16 to 512 bytes, inclusive. The default value is 16. If a value is specified and not in the range of 16 to 512, the AVM generates an error. The Unknown value (?) is not allowed.

Examples

GENERATE-SALT()

GENERATE-SALT(256)

GENERATE-SALT(iSize)

rSalt = GENERATE-SALT(32).

See also

GENERATE-PASSWORD-HASH function