The b64 module implements the encoding to and decoding from base64.
include ffl/b64.fs \ Create a string in the dictionary for storing the encoded characters str-create inbase64 \ Encode the string: The quick brown fox jumps over the lazy dog s" The quick brown fox jumps over the lazy dog" inbase64 b64-encode \ Print the result .( Base64 encoding of 'The quick brown fox jumps over the lazy dog' is: ) type cr \ The result is also stored in inbase64 .( inbase64 contents: ) inbase64 str-get type cr \ Create a string on the heap for storing the decoded characters str-new value frombase64 \ Decode the encoded string of The quick brown fox jumps over the lazy dog s" VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw==" frombase64 b64-decode .( Base64 decoding of 'VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw==' is: ) type cr \ The result is also stored in frombase64 .( frombase64 contents: ) frombase64 str-get type cr \ Free the string from the heap frombase64 str-free