Skip to end of banner
Go to start of banner

Base64 Functions and Properties

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Current »

In this article

encode

Description

Encodes a string using Base64.

This function is similar to the JavaScript base64 encode.

Syntax
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
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
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
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
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
Base64.decodeGZipAsBinary()
Example

Expression: Base64.decodeGZipAsBinary($City)

Where $City is a GZipped Base64 byte array.

Result"Pleasanton"

  • No labels