c2 = str.charcodeat(i++);
if(i == len)
{
out += base64encodechars.charat(c1 >> 2);
out += base64encodechars.charat(((c1 & 0x3)<< 4) | ((c2 & 0xf0) >> 4));
out += base64encodechars.charat((c2 & 0xf) << 2);
out += "=";
break;
}
c3 = str.charcodeat(i++);
out += base64encodechars.charat(c1 >> 2);
out += base64encodechars.charat(((c1 & 0x3)<< 4) | ((c2 & 0xf0) >> 4));
out += base64encodechars.charat(((c2 & 0xf) << 2) | ((c3 & 0xc0) >>6));
out += base64encodechars.charat(c3 & 0x
}
return out;
}
function base64decode(str) {
var c1, c2, c3, c4;
var i, len, out;