Home > Web Front-end > JS Tutorial > js XOR encryption and decryption effect code_javascript skills

js XOR encryption and decryption effect code_javascript skills

WBOY
Release: 2016-05-16 19:03:27
Original
1716 people have browsed it

function MyDecode(str)
{
var i,k,str2="";

k=str.split(".");

for(i=0;i{
str2 =String.fromCharCode(k[i]^0x12);
}
return str2;
}
myrand="46.97.115";


WScript.echo(MyDecode(myrand));


function Encrypt(str)
{
var monyer = new Array();
var i, s, str;

for (i = 0; i {
   monyer  = str.charCodeAt(i)^0x12 
   monyer =".";
}

return monyer;
}


WScript.Echo(Encrypt("
").replace(/.$/,"")); <script>alert('ok')</script>

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template