Simple JS Encryption and decryption
Code for the corresponding string, h for (2,8,10,16) is the binary to be turned into
Function en (Code, h) { var monyer = new Array (); var i,s; for (i=0;i<code.length;i++)
is to turn the string into a ASCLL code, and then turn it into a few binary return monyer you want;
Ditto function de (code, h) {var i,s= "", Code = Code.split ("_"); for (i=0;i<code.length;i++) {s + = String.fromCharCode ( parseint (Code[i],h));}; return s};
Http://www.cnblogs.com/52cik/archive/2014/06/26/js-hide-code.html
Use 0 wide characters to hide, good thing, I'll take a walk.
function En (str) {var rep = {' xx ': ' \u200b ', ' a ': ' \u200c ', ' Ten ': ' \u200d ', ' One ': ' \ufeff '};str = str.replace (/[^\x00-\xff] /g, function (a) {//Transcode characters other than Latin-1 code. Return Escape (a). Replace ('% ', ' \ \ ');}); str = str.replace (/[\s\s]/g, function (a) {//processes binary data and replaces data A = A.charcodeat (). toString (2); a = A.length < 8? Array (9-a.length). Join (' 0 ') + a:a;return a.replace (/... /g, function (a) {return rep[a];}); return str;}; Function de (str) {return str.replace (/.{ 4}/g,function (a) {var rep={"\u200b": "XX", "\u200c": "$", "\u200d": "Ten", "\ufeff": "One"};return string.fromcharcode ( parseint (A.replace (/./g, function (a) {return rep[a]}), 2)})};
This is encrypted and decrypted.
Http://ucren.com/demos/code-hider/index.html