Skip to content

Flow documentation · legacy product

Base64Encode ​

Declaration ​

Function Base64Encode( Input : string) : String;

Example ​

pascal
procedure OnMapEvent(var Value:Variant);
var
vOriginal, vEncoded: string;
begin
vOriginal := 'cameron';
vEncoded := Base64Encode(vOriginal); // value will be 'Y2FtZXJvbg=='
Value := vEncoded;
end;

Description ​

Encodes the input value using Base64.

Base64 encoding/decoding is commonly used when there is a need to encode binary data for transfer over media that is designed to deal with "plain text" data. This is to avoid the situation where a binary data character could be mistakenly interpreted as a control character (or as an invalid character) and thus cause the data packet to be interrupted or become corrupted. Base64 is used in a number of common applications, such as storing complex data in XML.