Go to documentation repository
Page History
The Base64EncodeW method encodes is used to encode a Unicode string to using the Base64 scheme. The method returns a string.
See also The Base64Decode method.
Method call syntaxSyntax for method invocation:
Code Block |
---|
function Base64EncodeW (data_in: String): String |
Method arguments:
- data_in – is a required argument. Sets a string to be encodedIt specifies the string that you want to encode.
Example. Encode Decode a string from Unicode string to Base64 then decode and put to , encode it back and display it in the debug logstring.
Code Block |
---|
var test = Base64EncodeWBase64Decode("test comment"); //the "test" variable will have value like "MAAzAC0AMAA3AC0AMgAwADEAOQAgADEANQA6ADMAOQA6ADQAMAA6AA0ACgB0AGUAcwB0ACAAMQANAAoAMAAzAC0AMAA3AC0AMgAwADEAOQAgADEANQA6ADQAMgA6ADIAMQA6AA0ACgB0AGUAcwB0ACAAMgA="MAAzAC0AMAA3AC0AMgAwADEAOQAgADEANQA6ADMAOQA6ADQAMAA6AA0ACgB0AGUAcwB0ACAAMQANAAoAMAAzAC0AMAA3AC0AMgAwADEAOQAgADEANQA6ADQAMgA6ADIAMQA6AA0ACgB0AGUAcwB0ACAAMgA=",true); DebugLogString("----->"+test); var res = Base64DecodeBase64EncodeW(test, true); // decode from Base64 to Unicode; if false, then 0 returned DebugLogString("----->"+res); // the debug log shall say: "test comment" |
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
Overview
Content Tools