-
-
Save wangtubs/b660b68a021f96c4aa2d705b0f39bb71 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _n(key,a) { | |
var b = "", | |
e, | |
c, | |
h, | |
f, | |
g, | |
d = 0, | |
a = a.replace(/[^A-Za-z0-9\+\/\=]/g, ""); | |
64 == this.key.length && (this.key += "="); | |
for (a += ["", "===", "==", "="][a.length % 4]; d < a.length;) e = key.indexOf(a.charAt(d++)), | |
c = key.indexOf(a.charAt(d++)), | |
f = key.indexOf(a.charAt(d++)), | |
g = key.indexOf(a.charAt(d++)), | |
e = e << 2 | c >> 4, | |
c = (c & 15) << 4 | f >> 2, | |
h = (f & 3) << 6 | g, | |
b += String.fromCharCode(e), | |
64 != f && (b += String.fromCharCode(c)), | |
64 != g && (b += String.fromCharCode(h)); | |
return b | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment