APEX docs
Reference

Encoding and crypto

Base64, hashing, encryption and compression.

base64decode

Also available as base64.decode base64_decode crypt.base64.decode crypt.base64_decode crypt.base64decode

Converts Base64 text back to the original string.

function base64decode(data: string): string

base64encode

Also available as base64.encode base64_encode crypt.base64.encode crypt.base64_encode crypt.base64encode

Converts a string to Base64 text.

function base64encode(data: string): string

crypt.decrypt

Also available as crypt.encrypt

Encrypts or decrypts data with a key. Six modes are supported, and with an authenticated mode a changed ciphertext fails to decrypt.

lz4compress

Also available as crypt.lz4compress lz4_compress

Compresses a string with the LZ4 algorithm.

function lz4compress(data: string): string

lz4decompress

Also available as crypt.lz4decompress lz4_decompress

Decompresses LZ4 data. Give the original size to limit how large the result may be.

function lz4decompress(data: string): string