base64.decode
base64.decode() Function
• Introduced in version 1.5.2
Accepts a Base64 encoded string and decodes it to plain text.
Usage
<source lang="mtmacro" line> base64.decode(string) </syntaxhighlight> Parameters
string
- The base64 encoded string to be decoded.
Example
Encode a string and then decode it.
<source lang="mtmacro" line>
[r: txt = "Four score and seven years ago..."]
[r: encTxt = base64.encode(txt)]
[r: base64.decode(encTxt)]
</syntaxhighlight>
Returns:
<source lang="mtmacro" line>
Four score and seven years ago...
Rm91ciBzY29yZSBhbmQgc2V2ZW4geWVhcnMgYWdvLi4u
Four score and seven years ago...