Playing with typed arrays, until found window.btoa() :)
Read more at https://developer.mozilla.org/en-US/docs/DOM/window.btoa.