http://zorba.io/modules/base64

View as XML or JSON.

Base64 encoding and decoding.

Function Summary

decode ($base64 as base64Binary) as string external

Decode a base64Binary.

decode ($base64 as base64Binary, $encoding as string) as string external

Decode a base64Binary.

encode ($string as string) as base64Binary external

Encode a string as base64Binary.

Functions

decode#1

declare  function base64:decode($base64 as base64Binary) as string external

Decode a base64Binary.

The function assumes that the content after decoding is valid UTF-8.

Parameters

base64 as base64Binary
The base64Binary item to decode

Returns

string
the base64-decoded value as string

decode#2

declare  function base64:decode($base64 as base64Binary, $encoding as string) as string external

Decode a base64Binary.

The function assumes that the content after decoding has the given encoding.

Parameters

base64 as base64Binary
The base64Binary item to decode
encoding as string
The encoding of the string after base64-decoding it. The encoding parameter is case insensitive.

Returns

string
the base64-decoded value as a string

encode#1

declare  function base64:encode($string as string) as base64Binary external

Encode a string as base64Binary.

Parameters

string as string
The item whose string-value should be encoded

Returns

base64Binary
the base64-encoded string-value of the item parameter