util.Strings.base64Decode() decodes a Base64 encoded string into a sequence of bytes and writes these bytes to the file passed as the parameter.
Syntax
util.Strings.base64Decode(string, filename)
Parameters
|
string |
the Base64 encoded string that must be decoded (STRING) |
|
filename |
the name of the file where the decoded string must be written to (STRING) |
When you specify a file name, be careful with its case.
UNIX is case-sensitive, so it will treat files which names come in different cases as separate files.
Usage and examples
util.Strings.base64Decode()
Then this file can be opened with the appropriate editor.
|
example code |
MAIN DEFINE base64 STRING LET base64 = util.Strings.base64Encode("attention.png") DISPLAY base64 CALL util.Strings.base64Decode(base64, "attention_png.png") CALL util.Strings.base64Decode(base64, "attention_txt.txt") CALL fgl_getkey() END MAIN |
|
obtained results |
|