Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reformatted tables

...

Table of Contents
maxLevel2
excludeAdditional Resources|Related Links|Related Information

encode

Description

Encodes a string using Base64.

This function is similar to the JavaScript base64 encode.

Syntax


Code Block
Base64.encode()


Example

Expression: Base64.encode($City)

Where $City contains a string.

Result: "UGxlYXNhbnRvbg=="

decode

Description

Decodes a string using Base64.

This function is similar to the JavaScript Base64 decode.

Syntax


Code Block
Base64.decode()


Example

Expression: Base64.decode($City)

Where $City contains an encoded string.

Result:  "Pleasanton"

decodeAsBinary

DescriptionDecodes the Base64 encoded string and returns it as a byte array.
Syntax


Code Block
Base64.decodeAsBinary()


Example

Expression: Base64.decodeAsBinary($City)

Where $City contains an encoded string.

Result: "_snaptype_binary_base64":
"dgrfbvfr"

encodeAsBinary

DescriptionEncodes binary data and returns a Base64 string.
Syntax


Code Block
Base64.encodeAsBinary()


Example

Expression: Base64.encodeAsBinary($City)

Where $City contains the byte array dgrfbvfr.

Result"_snaptype_binary_base64":
"MjM0"

decodeGZip

DescriptionUnzips and decodes the Base64 string.
Syntax


Code Block
Base64.decodeGZip()


Example

Expression: Base64.decodeGZip($City)

Where $City is a GZipped Base64 string.

Result"Pleasanton"

decodeGZipAsBinary

DescriptionUnzips and decodes the Base64 string as a byte array.
Syntax


Code Block
Base64.decodeGZipAsBinary()


Example

Expression: Base64.decodeGZipAsBinary($City)

Where $City is a GZipped Base64 byte array.

Result"Pleasanton"