util.Strings.base64EncodeFromString

Converts the string passed as parameter to a Base64 encoded string.

Syntax

util.Strings.base64EncodeFromString(
  source STRING
 )
  RETURNING result STRING
  1. source is the source string to convert in Base64.
  2. result is the resulting Base64 encoded string.

Usage

The util.Strings.base64EncodeFromString() method first converts the string passed as parameter to an array of bytes, then it converts the array of bytes the a Base64 representation, and returns the resulting Base64 encoded string.

Note: In contrast to util.Strings.urlEncode, the original string is not converted from the application locale to UTF-8, before performing the encoding to Base64: The resulting Base64 encoded string will contain byte sequences representing characters in the current application locale.

Example

IMPORT util
MAIN
    DISPLAY util.Strings.base64EncodeFromString( "ForĂȘt" )
END MAIN