OpenWGA does it not make easy to encode or decode strings to or from base64.
We now added a utility class for that:
WGA.Base64.encode(some_string) returns the base64 encoded string WGA.Base64.decode(some_base64_string) returns the decoded string