WebBase64EncodeEx Function

Action

Converts unsigned binary input into ASCII-encoded, printable characters.

Include file

WebAPI.bdh

Syntax

WebBase64EncodeEx( out sTarget    :string,
                   in  sSource    : string,
                   in  nSourceLen : number optional ): boolean;

Return value

  • true if the encoding was successful

  • false otherwise

Parameter Description
sTarget String variable to receive the encoded string.
sSource Source data to encode. This can also be binary data.
nSourceLen Length in bytes of the source data (optional). Specifiy STRING_COMPLETE or omit this parameter to encode all available data.

Example

transaction TWeb
  var
    sEncoded : string;
    sDecoded : string;
  begin
    WebBase64EncodeEx(sEncoded, "Hallo");
    WebBase64DecodeEx(sDecoded, sEncoded);
    print(sEncoded);
    print(sDecoded);
  end TWeb;