angularjs-base64编码和解码


<html>
<head>
    <meta charset="utf-8">
    <title>base64加密title>

    <script>
        function Base64() {

            // private property
            _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

            // public method for encoding
            this.encode = function (input) {
                var output = "";
                var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
                var i = 0;
                input = _utf8_encode(input);
                while (i < input.length) {
                    chr1 = input.charCodeAt(i++);
                    chr2 = input.charCodeAt(i++);
                    chr3 = input.charCodeAt(i++);
                    enc1 = chr1 >> 2;
                    enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
                    enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
                    enc4 = chr3 & 63;
                    if (isNaN(chr2)) {
                        enc3 = enc4 = 64;
                    } else if (isNaN(chr3)) {
                        enc4 = 64;
                    }
                    output = output +
                            _keyStr.charAt(enc1) + _keyStr.charAt(enc2) +
                            _keyStr.charAt(enc3) + _keyStr.charAt(enc4);
                }
                return output;
            }

            // public method for decoding
            this.decode = function (input) {
                var output = "";
                var chr1, chr2, chr3;
                var enc1, enc2, enc3, enc4;
                var i = 0;
                input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
                while (i < input.length) {
                    enc1 = _keyStr.indexOf(input.charAt(i++));
                    enc2 = _keyStr.indexOf(input.charAt(i++));
                    enc3 = _keyStr.indexOf(input.charAt(i++));
                    enc4 = _keyStr.indexOf(input.charAt(i++));
                    chr1 = (enc1 << 2) | (enc2 >> 4);
                    chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
                    chr3 = ((enc3 & 3) << 6) | enc4;
                    output = output + String.fromCharCode(chr1);
                    if (enc3 != 64) {
                        output = output + String.fromCharCode(chr2);
                    }
                    if (enc4 != 64) {
                        output = output + String.fromCharCode(chr3);
                    }
                }
                output = _utf8_decode(output);
                return output;
            }

            // private method for UTF-8 encoding
            _utf8_encode = function (string) {
                string = string.replace(/\r\n/g, "\n");
                var utftext = "";
                for (var n = 0; n < string.length; n++) {
                    var c = string.charCodeAt(n);
                    if (c < 128) {
                        utftext += String.fromCharCode(c);
                    } else if ((c > 127) && (c < 2048)) {
                        utftext += String.fromCharCode((c >> 6) | 192);
                        utftext += String.fromCharCode((c & 63) | 128);
                    } else {
                        utftext += String.fromCharCode((c >> 12) | 224);
                        utftext += String.fromCharCode(((c >> 6) & 63) | 128);
                        utftext += String.fromCharCode((c & 63) | 128);
                    }

                }
                return utftext;
            }

            // private method for UTF-8 decoding
            _utf8_decode = function (utftext) {
                var string = "";
                var i = 0;
                var c = c1 = c2 = 0;
                while (i < utftext.length) {
                    c = utftext.charCodeAt(i);
                    if (c < 128) {
                        string += String.fromCharCode(c);
                        i++;
                    } else if ((c > 191) && (c < 224)) {
                        c2 = utftext.charCodeAt(i + 1);
                        string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
                        i += 2;
                    } else {
                        c2 = utftext.charCodeAt(i + 1);
                        c3 = utftext.charCodeAt(i + 2);
                        string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
                        i += 3;
                    }
                }
                return string;
            }

        }
    script>

head>

<body>
<p id="p1">PHAgc3R5bGU9ImxpbmUtaGVpZ2h0OiAyZW07Ij48c3BhbiBzdHlsZT0iZm9u
    dC1zaXplOiAxNnB4OyBmb250LWZhbWlseTog5b6u6L2v6ZuF6buRLCAnTWlj
    cm9zb2Z0IFlhSGVpJzsiPjxzcGFuIGlkPSJfYmFpZHVfYm9va21hcmtfc3Rh
    cnRfNDEiIHN0eWxlPSJkaXNwbGF5OiBub25lOyBsaW5lLWhlaWdodDogMHB4
    OyI+4oCNPC9zcGFuPjxzcGFuIGlkPSJfYmFpZHVfYm9va21hcmtfc3RhcnRf
    NDMiIHN0eWxlPSJkaXNwbGF5OiBub25lOyBsaW5lLWhlaWdodDogMHB4OyI+
    4oCNPC9zcGFuPjxzcGFuIGlkPSJfYmFpZHVfYm9va21hcmtfc3RhcnRfMzci
    IHN0eWxlPSJk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iYWlkdV9ib29rbWFya19zdGFydF8zIiBz
    dHlsZT0iZGlzcGxheTogbm9uZTsgbGluZS1oZWlnaHQ6IDBweDsiPuKAjTwv
    c3Bhbj7vu788aW1nIHdpZHRoPSIxMDAlIiBzcmM9Imh0dHA6Ly9ub25namli
    YW8uMTg5LmNuOjgwL2FkbWluL3VlZGl0b3IvbG9hZEltZ0RhdGEvMGNiMTdl
    MTEtMTgxNS00M2Q4LWE3NTYtZWUyMTc1YzlkZmIzXzIwMTcwMzA2MTE0MTM5
    NDEzOS5qcGciIHRpdGxlPSIyLmpwZyIvPjwvc3Bhbj48L3A+PHAgc3R5bGU9
    InRleHQtaW5kZW50OiAyZW07IGxpbmUtaGVpZ2h0OiAyZW07Ij48c3BhbiBz
    dHlsZT0iZm9udC1zaXplOiAxNnB4OyBmb250LWZhbWlseTog5b6u6L2v6ZuF
    6buRLCAnTWljcm9zb2Z0IFlhSGVpJzsiPjIwMTflubQz5pyINeaXpe+8jOes
    rOWNgeS6jOWxiuWFqOWbveS6uuawkeS7o+ihqOWkp+S8muesrOS6lOasoeS8
    muiuruWcqOWMl+S6rOS6uuawkeWkp+S8muWgguW8gOW5leOAguWbveWKoemZ
    ouaAu+eQhuadjuWFi+W8uuS9nOaUv+W6nOW3peS9nOaKpeWRiuOAguaAu+eQ
    huWcqOaKpeWRiuS4reaMh+WHuu+8jOKAnOimgeS/neivgeWxheawkeaUtuWF
    peWSjOe7j+a1juWinumVv+WfuuacrOWQjOatpeKAneOAgjwvc3Bhbj48L3A+
    PHAgc3R5bGU9Im1hcmdpbi10b3A6IDBweDsgbWFyZ2luLWJvdHRvbTogMHB4
    OyBwYWRkaW5nOiAwcHg7IHRleHQtaW5kZW50OiAyZW07IGNvbG9yOiByZ2Io
    MzQsIDM0LCAzNCk7IGZvbnQtZmFtaWx5OiAnTWljcm9zb2Z0IFlhSGVpJywg
    5b6u6L2v6ZuF6buROyBmb250LXNpemU6IDE0cHg7IHdoaXRlLXNwYWNlOiBu
    b3JtYWw7IGxpbmUtaGVpZ2h0OiAyZW07Ij48c3BhbiBzdHlsZT0iZm9udC1z
    aXplOiAxNnB4OyBmb250LWZhbWlseTog5b6u6L2v6ZuF6buRLCAnTWljcm9z
    b2Z0IFlhSGVpJzsiPumCo+S5iOS7iuW5tOWTquS6m+mSseimgea2qO+8n+WT
    quS6m+mSseimgemZje+8n+WTquS6m+aUtui0ueWwhuWPlua2iO+8nzwvc3Bh
    bj48L3A+PHAgc3R5bGU9Im1hcmdpbi10b3A6IDBweDsgbWFyZ2luLWJvdHRv
    bTogMHB4OyBwYWRkaW5nOiAwcHg7IHRleHQtaW5kZW50OiAyZW07IGNvbG9y
    OiByZ2IoMzQsIDM0LCAzNCk7IGZvbnQtZmFtaWx5OiAnTWljcm9zb2Z0IFlh
    SGVpJywg5b6u6L2v6ZuF6buROyBmb250LXNpemU6IDE0cHg7IHdoaXRlLXNw
    YWNlOiBub3JtYWw7IGxpbmUtaGVpZ2h0OiAyZW07Ij48c3BhbiBzdHlsZT0i
    Zm9udC1zaXplOiAxNnB4OyBmb250LWZhbWlseTog5b6u6L2v6ZuF6buRLCAn
    TWljcm9zb2Z0IFlhSGVpJzsiPuaJtui0q+i1hOmHkeWinumVvzMwJeS7peS4
    ijwvc3Bhbj48L3A+PHAgc3R5bGU9Im1hcmdpbi10b3A6IDBweDsgbWFyZ2lu
    LWJvdHRvbTogMHB4OyBwYWRkaW5nOiAwcHg7IHRleHQtaW5kZW50OiAyZW07
    IGNvbG9yOiByZ2IoMzQsIDM0LCAzNCk7IGZvbnQtZmFtaWx5OiAnTWljcm9z
    b2Z0IFlhSGVpJywg5b6u6L2v6ZuF6buROyBmb250LXNpemU6IDE0cHg7IHdo
    aXRlLXNwYWNlOiBub3JtYWw7IGxpbmUtaGVpZ2h0OiAyZW07Ij48c3BhbiBz
    dHlsZT0iZm9udC1zaXplOiAxNnB4OyBmb250LWZhbWlseTog5b6u6L2v6ZuF
    6buRLCAnTWljcm9zb2Z0IFlhSGVpJ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tYXJnaW4tYm90dG9tOiAwcHg7IHBh
    ZGRpbmc6IDBweDsgdGV4dC1pbmRlbnQ6IDJlbTsgY29sb3I6IHJnYigzNCwg
    MzQsIDM0KTsgZm9udC1mYW1pbHk6ICdNaWNyb3NvZnQgWWFIZWknLCDlvq7o
    va/pm4Xpu5E7IGZvbnQtc2l6ZTogMTRweDsgd2hpdGUtc3BhY2U6IG5vcm1h
    bDsgbGluZS1oZWlnaHQ6IDJlbTsiPjxzcGFuIHN0eWxlPSJmb250LXNpemU6
    IDE2cHg7IGZvbnQtZmFtaWx5OiDlvq7ova/pm4Xpu5EsICdNaWNyb3NvZnQg
    WWFIZWknOyI+MjAxN+W5tO+8jOWfjuS5oeWxheawkeWMu+S/nei0ouaUv+ih
    peWKqeeUseavj+S6uuavj+W5tDQyMOWFg+aPkOmrmOWIsDQ1MOWFg++8jOWQ
    jOatpeaPkOmrmOS4quS6uue8tOi0ueagh+WHhu+8jOaJqeWkp+eUqOiNr+S/
    nemanOiMg+WbtOOAguWcqOWFqOWbveaOqOi/m+WMu+S/neS/oeaBr+iBlOe9
    ke+8jOWunueOsOW8guWcsOWwseWMu+S9j+mZoui0ueeUqOebtOaOpee7k+eu
    l+OAguWujOWWhOWkp+eXheS/nemZqeWItuW6pu+8jOaPkOmrmOS/nemanOaw
    tOW5s+OAgjwvc3Bhbj48L3A+PHAgc3R5bGU9Im1hcmdpbi10b3A6IDBweDsg
    bWFyZ2luLWJvdHRvbTogMHB4OyBwYWRkaW5nOiAwcHg7IHRleHQtaW5kZW50
    OiAyZW07IGNvbG9yOiByZ2IoMzQsIDM0LCAzNCk7IGZvbnQtZmFtaWx5OiAn
    TWljcm9zb2Z0IFlhSGVpJywg5b6u6L2v6ZuF6buROyBmb250LXNpemU6IDE0
    cHg7IHdoaXRlLXNwYWNlOiBub3JtYWw7IGxpbmUtaGVpZ2h0OiAyZW07Ij48
    c3BhbiBzdHlsZT0iZm9udC1zaXplOiAxNnB4OyBmb250LWZhbWlseTog5b6u
    6L2v6ZuF6buRLCAnTWljcm9zb2Z0IFlhSGVpJzsiPuWwj+W+ruS8geS4muWP
    jOWIm+WlluWKseaPkOmrmDwvc3Bhbj48L3A+PHAgc3R5bGU9Im1hcmdpbi10
    b3A6IDBweDsgbWFyZ2luLWJvdHRvbTogMHB4OyBwYWRkaW5nOiAwcHg7IHRl
    eHQtaW5kZW50OiAyZW07IGNvbG9yOiByZ2IoMzQsIDM0LCAzNCk7IGZvbnQt
    ZmFtaWx5OiAnTWljcm9zb2Z0IFlhSGVpJywg5b6u6L2v6ZuF6buROyBmb250
    LXNpemU6IDE0cHg7IHdoaXRlLXNwYWNlOiBub3JtYWw7IGxpbmUtaGVpZ2h0
    OiAyZW07Ij48c3BhbiBzdHlsZT0iZm9udC1zaXplOiAxNnB4OyBmb250LWZh
    bWlseTog5b6u6L2v6ZuF6buRLCAnTWljcm9zb2Z0IFlhSGVpJzsiPuaJqeWk
    p+Wwj+W+ruS8geS4muS6q+WPl+WHj+WNiuW+geaUtuaJgOW+l+eojuS8mOaD
    oOeahOiMg+WbtO+8jOW5tOW6lOe6s+eojuaJgOW+l+mineS4iumZkOeUsTMw
    5LiH5YWD5o+Q6auY5YiwNTDkuIflhYPvvJvnp5HmioDlnovkuK3lsI/kvIHk
    uJrnoJTlj5HotLnnlKjliqDorqHmiaPpmaTmr5TkvovnlLE1MCXmj5Dpq5jl
    iLA3NSXjgILljYPmlrnnmb7orqHkvb/nu5PmnoTmgKflh4/nqI7lipvluqbl
    kozmlYjlupTov5vkuIDmraXmmL7njrDjgII8L3NwYW4+PC9wPjxwIHN0eWxl
    PSJtYXJnaW4tdG9wOiAwcHg7IG1hcmdpbi1ib3R0b206IDBweDsgcGFkZGlu
    ZzogMHB4OyB0ZXh0LWluZGVudDogMmVtOyBjb2xvcjogcmdiKDM0LCAzNCwg
    MzQpOyBmb250LWZhbWlseTogJ01pY3Jvc29mdCBZYUhlaScsIOW+rui9r+mb
    hem7kTsgZm9udC1zaXplOiAxNHB4OyB3aGl0ZS1zcGFjZTogbm9ybWFsOyBs
    aW5lLWhlaWdodDogMmVtOyI+PHNwYW4gc3R5bGU9ImZvbnQtc2l6ZTogMTZw
    eDsgZm9udC1mYW1pbHk6IOW+rui9r+mbhem7kSwgJ01pY3Jvc29mdCBZYUhl
    aSc7Ij7pgIDkvJHkurrlkZjln7rmnKzlhbvogIHph5Hmj5Dpq5g8L3NwYW4+
    PC9wPjxwIHN0eWxlPSJtYXJnaW4tdG9wOiAwcHg7IG1hcmdpbi1ib3R0b206
    IDBweDsgcGFkZGluZzogMHB4OyB0ZXh0LWluZGVudDogMmVtOyBjb2xvcjog
    cmdiKDM0LCAzNCwgMzQpOyBmb250LWZhbWlseTogJ01pY3Jvc29mdCBZYUhl
    aScsIOW+rui9r+mbhem7kTsgZm9udC1zaXplOiAxNHB4OyB3aGl0ZS1zcGFj
    ZTogbm9ybWFsOyBsaW5lLWhlaWdodDogMmVtOyI+PHNwYW4gc3R5bGU9ImZv
    bnQtc2l6ZTogMTZweDsgZm9udC1mYW1pbHk6IOW+rui9r+mbhem7kSwgJ01p
    Y3Jvc29mdCBZYUhlaSc7Ij7mgLvnkIblnKjmlL/lupzlt6XkvZzmiqXlkYrk
    uK3mj5Dlh7rvvIznu6fnu63mj5Dpq5jpgIDkvJHkurrlkZjln7rmnKzlhbvo
    gIHph5HvvIznoa7kv53mjInml7botrPpop3lj5HmlL7jgILnqLPmraXmj5Dp
    q5jkvJjmiprjgIHnpL7kvJrmlZHliqnmoIflh4bvvIzlrp7mlr3lpb3kuLTm
    l7bmlZHliqnliLbluqbjgII8L3NwYW4+PC9wPjxwPjxici8+PC9wPjxwIHN0
    eWxlPSJsaW5lLWhlaWdodDogMmVtOyI+PHNwYW4gc3R5bGU9ImZvbnQtZmFt
    aWx5OiDlvq7ova/pm4Xpu5EsICdNaWNyb3NvZnQgWWFIZWknOyBmb250LXNp
    emU6IDE2cHg7Ij48c3BhbiBpZD0iX2JhaWR1X2Jvb2ttYXJrX2V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bWFya19lbmRfMzAiIHN0
    eWxlPSJkaXNwbGF5OiBub25lOyBsaW5lLWhlaWdodDogMHB4OyI+4oCNPC9z
    cGFuPjxzcGFuIGlkPSJfYmFpZHVfYm9va21hcmtfZW5kXzMwIiBzdHlsZT0i
    ZGlzcGxheTogbm9uZTsgbGluZS1oZWlnaHQ6IDBweDsiPjwvc3Bhbj48L3Nw YW4+PC9wPg==p>
<script>
    var b = new Base64();
    str = document.getElementById("p1").innerHTML;
    //解密
    str = b.decode(str);
    document.getElementById("p1").innerHTML = str;
script>

body>
html>

你可能感兴趣的:(angularjs,angularjs)