php – javascript – btoa, atob – Kódování Base64
// encode a stringencodedData = btoa(„Hello, world“); // decode the stringdecodedData = atob(encodedData); function utf8_to_b64(str) { return window.btoa(unescape(encodeURIComponent(str)));} function b64_to_utf8(str) { return decodeURIComponent(escape(window.atob(str)));