Documentation for Axxon PSIM 1.0.0-1.0.1.

Previous page The Base64EncodeFile method  The run_cmd and run_cmd_timeout methods Next page


The Base64EncodeW method is used to encode a Unicode string using the Base64 scheme. The method returns a string.

See also The Base64Decode method.

Syntax for method invocation:

function Base64EncodeW (data_in: String): String

Method arguments:

  1. data_in is a required argument. It specifies the string that you want to encode.

Example. Decode a string from Unicode to Base64, encode it back and display it in the debug string.

var test = Base64Decode("MAAzAC0AMAA3AC0AMgAwADEAOQAgADEANQA6ADMAOQA6ADQAMAA6AA0ACgB0AGUAcwB0ACAAMQANAAoAMAAzAC0AMAA3AC0AMgAwADEAOQAgADEANQA6ADQAMgA6ADIAMQA6AA0ACgB0AGUAcwB0ACAAMgA=",true);
DebugLogString("----->"+test);
var res = Base64EncodeW(test);
DebugLogString("----->"+res);

If the Base64Decode method received the true parameter, the script will have the following output:

03-07-2019 15:39:40:
test 1
03-07-2019 15:42:21:
test 2


  • No labels