tiny-b64.js - Base64 Codec for tinyJS

tiny-b64.js packs a Base64-Codec into the Object t.b64, containing the Methods .enc(ode) and .dec(ode).

Download

tiny-b64.js [765b] - tiny-b64-min.js.gz [329b]

Hint

The t.b64-Codec requires only tiny.js. Other scripts are not necessary.

Usage

The Methods .enc and .dec take a string as argument and return the Base64 en- re decoded string.

Example

(function() {
    function test() {
        var data=t('#testinput').v(), to=t.b64.enc(data);
        t('#to').h(to);
        t('#re').h(t.b64.dec(to));
    }
    t('#test').e('mousedown', test);
})();