Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 Where $City contains a string.

Result: "UGxlYXNhbnRvbg=="

...

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 Where $City contains an encoded string.

Result:  "Pleasanton"

...

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


Code Block
Base64.decodeAsBinary()


Example

Expression: Base64.decodeAsBinary($City)

where Where $City contains an encoded string.

Result: "_snaptype_binary_base64":
"dgrfbvfr"

...

DescriptionEncodes binary data and returns a Base64 string.
Syntax


Code Block
Base64.encodeAsBinary()


Example

Expression: Base64.encodeAsBinary($City)

where Where $City contains the byte array dgrfbvfr.

Result: "_snaptype_binary_base64":
"MjM0"

...

DescriptionUnzips and decodes the Base64 string.
Syntax


Code Block
Base64.decodeGZip()


Example

Expression: Base64.decodeGZip($City)

where 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 Where $City is a GZipped Base64 byte array.

Result: "Pleasanton"