Package: system

Basic system APIs.

Methods

digest

function digest(message as string) as string

Creates a SHA1 digest of the message.

digestSHA256

function digestSHA256(message as string) as string

Creates a SHA256 digest of the message.

digestSHA512

function digestSHA512(message as string) as string

Creates a SHA512 digest of the message.

digestWithAlgorithm

function digestWithAlgorithm(message as string, algorithm as string) as string

Creates a digest of the message based on the algorithm.s

encryptHmacMD5

function encryptHmacMD5(data as string, key as string) as string

Computes a Hash-based Message Authentication Code (HMAC) using the MD5 hash function.

Since 1.5.1

error

method error(errorText as string)

Raises an error and terminates execution.

errorIf

method errorIf(condition as bool, errorText as string)

If the condition is true, raises an error and terminates execution.

flushCache

method flushCache()

Flushes the system cache.

getCurrentUser

function getCurrentUser() as user

Returns the current user.

type user {
    var name as string;
    var idOrganization as int;
    var idBusinessUnit as int;
    var key as int;
}

isAtomic

function isAtomic() as bool

Returns true if the current method is part of a transaction.

Since 1.5.1

randomString

function randomUUID() as string

Creates and returns a new random string.

randomUUID

function randomUUID() as string

Creates and returns a new random UUID.

secureRandom

function secureRandom() as string

Creates and returns a new random string using a cryptographically strong random number generator.

sequence

function sequence(start as int, count as int, step as int) as collection of int

Creates and returns a collection of integers starting at start with count items, using step as the increment.