base64_string()

Scalar. Returns a base64-encoded string for a given binary value.

Syntax

base64_string ( binary )

Parameters

binary

A binary value.

Usage

The function encodes a binary value to form a base64-encoded string. One or two padding characters, '=' are added to the end to make the string length divisible by 4. The function returns a string.

Example

base64_string ( hex_binary ('64') ) returns ZQ==.

base64_string ( hex_binary ('6C6561737572652E') ) returns bGVhc3VyZS4=.