security.RandomGenerator.CreateRandomString

Creates a random base64 string.

Syntax

security.RandomGenerator.CreateRandomString(
   size INTEGER )
  RETURNING result STRING
  1. size is the size of the random string.
  2. result is the generated random string in Base64.

Usage

Generates a random binary data of size bytes long and returns it in a STRING encoded in a Base64 form.

The size must be greater than 0.

Use this function when randomness is required, such as in xml.CryptoKey.deriveKey() or security.Digest.CreateDigestString().

Throws an exception in case of errors, and updates STATUS with an error code.