来自 关于计算机 2019-11-28 19:40 的文章
当前位置: 澳门太阳娱乐手机登录 > 关于计算机 > 正文

EditPlus注册码生成器_javascript才具_脚本之家

今日同事惊喜的告知笔者,说找到个在线的EditPlus注册码生成器,小编飞快去看了看,还真是,在那。 exe的注册机病毒太多,纯js的在线注册机可就放心了。 笔者是从旁人的注册机反汇编然后寻找算法的,更令我愕然的是,那小编德姆on竟然是搞法律的,才刚获得法则专业资格证书,佩性格很顽强在荆棘丛生或巨大压力面前不屈。 首要的二个js函数是那样的: 复制代码 代码如下: function generate_editplus_regcode{ var list = [0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8000,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16000,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32000,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448]; var hexchars = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F']; var regcode = new Array; var i = 0, j = 0, k = 0; var len, temp, sum, result; username = usernamereplace; for { for { regcode[k] = hexchars[parseInt]; } if break; regcode[k] = '-'; } len = usernamelength; sum = 1; for{ sum += usernamecharCodeAt; } temp = / 6 )

本文实例叙述了JS达成的3des+base64加密解密算法。分享给大家供我们参照他事他说加以考察,具体如下:

  • 3) * 7 % 16; regcode[6] = hexchars[temp & 0xF]; sum = 1; for{ sum += usernamecharCodeAt; } temp = parseInt % 16; regcode[9] = hexchars[temp & 0xF]; sum = 1; for{ sum += usernamecharCodeAt; } temp = parseInt % 16; regcode[7] = hexchars[temp & 0xF]; sum = 1; for{ sum += usernamecharCodeAt; } temp = parseInt * 8 % 16; regcode[10] = hexchars[temp & 0xF]; sum = 1; for{ sum += usernamecharCodeAt; } temp = (parseInt + 36) % 16; regcode[4] = hexchars[temp & 0xF]; sum = 1; for{ sum += usernamecharCodeAt; } temp = parseInt % 16; regcode[8] = hexchars[temp & 0xF]; result = 0; for{ result = ^ list[usernamecharCodeAt]; } result = resulttoString; regcode[2] = resultcharAt; regcode[3] = resultcharAt; len = regcodelength; result = 0; for{ result = ^ list[regcode[i]toString ^ ]; } result = resulttoString; regcode[0] = resultcharAt; regcode[1] = resultcharAt; return regcodejoin; }
  1. index.html:

    www.jb51.net BASE64编码 var str = "网址://www.jb51.net";document.write;var base64 = BASE64.encoder;//返回编码后的字符document.write("</br>BASE64后:</br>"+base64);//alert;var unicode= BASE64.decoder;//返回会解码后的字符串。//alert;document.write("</br>还原:</br>"+unicode);//var str= "你好123hello";var key = "qXSdHWfbSZaaLeHBRhLgxBiG";//alert;var des3en = DES3.encrypt;document.write("</br>des3加密:</br>"+des3en);document.write("</br>des3解密:</br>"+DES3.decrypt;

  2. DES3.js文件:

    /* DES 加密算法 该函数选用多少个 8 字节字符串作为普通 DES 算法的密钥(也正是 64 位,不过算法只利用 56 位),大概收受多少个 24 字节字符串作为 3DES 算法的密钥;第一个参数是要加密或解密的音讯字符串;第多少个布尔值参数用来表明音讯是加密可能解密;接下去的可选参数 mode 假设是 0 表示 ECB 格局,1 代表 CBC 方式,默许是 ECB 形式;倒数可筛选是多少个 8 字节的输入向量字符串。再次回到的密文是字符串。 参数:

    • key: 8字节字符串作为日常 DES 算法的密钥,或 24 字节字符串作为 3DES
    • message: 加密或解密的新闻字符串
    • encrypt: 布尔值参数用来表明消息是加密抑或解密
    • mode: 1:CBC模式,0:ECB模式
    • iv:
    • padding: 可接收, 8字节的输入向量字符串 *///this takes the key, the message, and whether to encrypt or decryptfunction des (key, message, encrypt, mode, iv, padding卡塔尔(英语:State of Qatar) { if //要是是加密的话,首先调换编码 message = unescape(encodeUWranglerIComponent; //declaring this locally speeds things up a bit var spfunction1 = new Array (0x1010400,0,0x10000,0x1010404,0x1010004,0x10404,0x4,0x10000,0x400,0x1010400,0x1010404,0x400,0x1000404,0x1010004,0x1000000,0x4,0x404,0x1000400,0x1000400,0x10400,0x10400,0x1010000,0x1010000,0x1000404,0x10004,0x1000004,0x1000004,0x10004,0,0x404,0x10404,0x1000000,0x10000,0x1010404,0x4,0x1010000,0x1010400,0x1000000,0x1000000,0x400,0x1010004,0x10000,0x10400,0x1000004,0x400,0x4,0x1000404,0x10404,0x1010404,0x10004,0x1010000,0x1000404,0x1000004,0x404,0x10404,0x1010400,0x404,0x1000400,0x1000400,0,0x10004,0x10400,0,0x1010004卡塔尔(英语:State of Qatar); var spfunction2 = new Array (-0x7fef7fe0,-0x7fff8000,0x8000,0x108020,0x100000,0x20,-0x7fefffe0,-0x7fff7fe0,-0x7fffffe0,-0x7fef7fe0,-0x7fef8000,-0x80000000,-0x7fff8000,0x100000,0x20,-0x7fefffe0,0x108000,0x100020,-0x7fff7fe0,0,-0x80000000,0x8000,0x108020,-0x7ff00000,0x100020,-0x7fffffe0,0,0x108000,0x8020,-0x7fef8000,-0x7ff00000,0x8020,0,0x108020,-0x7fefffe0,0x100000,-0x7fff7fe0,-0x7ff00000,-0x7fef8000,0x8000,-0x7ff00000,-0x7fff8000,0x20,-0x7fef7fe0,0x108020,0x20,0x8000,-0x80000000,0x8020,-0x7fef8000,0x100000,-0x7fffffe0,0x100020,-0x7fff7fe0,-0x7fffffe0,0x100020,0x108000,0,-0x7fff8000,0x8020,-0x80000000,-0x7fefffe0,-0x7fef7fe0,0x108000卡塔尔; var spfunction3 = new Array (0x208,0x8020200,0,0x80二〇〇一8,0x8000200,0,0x20208,0x8000200,0x二零零一8,0x8000008,0x8000008,0x20020,0x8020208,0x二〇〇〇8,0x80二零零四0,0x208,0x8000000,0x8,0x8020200,0x200,0x20200,0x80二〇〇一0,0x80二零零二8,0x20208,0x8000208,0x20200,0x二〇〇二0,0x8000208,0x8,0x8020208,0x200,0x8000000,0x8020200,0x8000000,0x二〇〇三8,0x208,0x二零零一0,0x8020200,0x8000200,0,0x200,0x20048,0x8020208,0x8000200,0x8000008,0x200,0,0x8020018,0x8000208,0x二〇〇四0,0x8000000,0x8020208,0x8,0x20208,0x20200,0x8000008,0x80贰零零贰0,0x8000208,0x208,0x80二〇〇一0,0x20208,0x8,0x80二零零三8,0x20200卡塔尔(英语:State of Qatar); var spfunction4 = new Array (0x80二零零一,0x2081,0x2081,0x80,0x802080,0x800081,0x800001,0x二零零三,0,0x80二〇〇一,0x80二〇〇三,0x802081,0x81,0,0x800080,0x800001,0x1,0x二〇〇四,0x800000,0x80二零零二,0x80,0x800000,0x二〇〇三,0x2080,0x800081,0x1,0x2080,0x800080,0x2003,0x802080,0x802081,0x81,0x800080,0x800001,0x80二〇〇〇,0x802081,0x81,0,0,0x80二〇〇二,0x2080,0x800080,0x800081,0x1,0x80二〇〇一,0x2081,0x2081,0x80,0x802081,0x81,0x1,0x二〇〇〇,0x800001,0x二零零一,0x802080,0x800081,0x二〇〇二,0x2080,0x800000,0x802002,0x80,0x800000,0x贰零零零,0x802080卡塔尔国; var spfunction5 = new Array (0x100,0x2080100,0x2080000,0x42004100,0x80000,0x100,0x40000000,0x2080000,0x40080100,0x80000,0x二〇〇三100,0x40080100,0x4二零零二100,0x42080000,0x80100,0x40000000,0x贰零零零000,0x40080000,0x40080000,0,0x40000100,0x42080100,0x42080100,0x2004100,0x42080000,0x40000100,0,0x42003000,0x2080100,0x二〇〇一000,0x4二〇〇四000,0x80100,0x80000,0x4二〇〇二100,0x100,0x2004000,0x40000000,0x2080000,0x4二〇〇〇100,0x40080100,0x2003100,0x40000000,0x42080000,0x2080100,0x40080100,0x100,0x二零零零000,0x42080000,0x42080100,0x80100,0x4二〇〇三000,0x42080100,0x2080000,0,0x40080000,0x42001000,0x80100,0x二〇〇一100,0x40000100,0x80000,0,0x40080000,0x2080100,0x40000100卡塔尔国; var spfunction6 = new Array (0x二零零零0010,0x20400000,0x4000,0x20404010,0x20400000,0x10,0x20404010,0x400000,0x20044000,0x404010,0x400000,0x二零零三0010,0x400010,0x20024000,0x20010000,0x4010,0,0x400010,0x二零零二4010,0x4000,0x404000,0x二零零零4010,0x10,0x20400010,0x20400010,0,0x404010,0x20404000,0x4010,0x404000,0x20404000,0x二零零四0000,0x二〇〇二4000,0x10,0x20400010,0x404000,0x20404010,0x400000,0x4010,0x二〇〇二0010,0x400000,0x20034000,0x二零零四0000,0x4010,0x二零零零0010,0x20404010,0x404000,0x20400000,0x404010,0x20404000,0,0x20400010,0x10,0x4000,0x20400000,0x404010,0x4000,0x400010,0x20024010,0,0x20404000,0x二〇〇一0000,0x400010,0x二〇〇四4010卡塔尔(قطر‎; var spfunction7 = new Array (0x200400,0x4二〇〇三02,0x4000802,0,0x800,0x4000802,0x二〇〇九02,0x4二〇一〇00,0x4二〇〇八02,0x二零零二00,0,0x4000002,0x2,0x4000000,0x4二零零四02,0x802,0x4000800,0x二零零六02,0x二〇〇三02,0x4000800,0x4000002,0x4200300,0x4二零一零00,0x贰零零肆02,0x4贰零零贰00,0x800,0x802,0x4二〇〇九02,0x二零零六00,0x2,0x4000000,0x二零零六00,0x4000000,0x二零一零00,0x二〇〇三00,0x4000802,0x4000802,0x4贰零零贰02,0x4二〇〇四02,0x2,0x二〇〇四02,0x4000000,0x4000800,0x贰零零贰00,0x4二零零六00,0x802,0x二零零六02,0x4200900,0x802,0x4000002,0x4二零零六02,0x4二〇〇二00,0x二零零六00,0,0x2,0x4二零一零02,0,0x二〇〇九02,0x4二零零二00,0x800,0x4000002,0x4000800,0x800,0x二〇〇三02卡塔尔国; var spfunction8 = new Array (0x10001040,0x1000,0x40000,0x10041040,0x10000000,0x10001040,0x40,0x10000000,0x40040,0x10040000,0x10041040,0x41000,0x10041000,0x41040,0x1000,0x40,0x10040000,0x10000040,0x10001000,0x1040,0x41000,0x40040,0x10040040,0x10041000,0x1040,0,0,0x10040040,0x10000040,0x10001000,0x41040,0x40000,0x41040,0x40000,0x10041000,0x1000,0x40,0x10040040,0x1000,0x41040,0x10001000,0x40,0x10000040,0x10040000,0x10040040,0x10000000,0x40000,0x10001040,0,0x10041040,0x40040,0x10000040,0x10040000,0x10001000,0x10001040,0,0x10041040,0x41000,0x41000,0x1040,0x1040,0x40040,0x10000000,0x10041000卡塔尔国; //create the 16 or 48 subkeys we will need var keys = des_createKeys ; var m=0, i, j, temp, temp2, right1, right2, left, right, looping; var cbcleft, cbcleft2, cbcright, cbcright2 var endloop, loopinc; var len = message.length; var chunk = 0; //set up the loops for single and triple des var iterations = keys.length == 32 ? 3 : 9; //single or triple des if {looping = encrypt ? new Array : new Array ;} else {looping = encrypt ? new Array (0, 32, 2, 62, 30, -2, 64, 96, 2) : new Array (94, 62, -2, 32, 64, 2, 30, -2, -2);} //pad the message depending on the padding parameter if message += " "; //pad the message with spaces else if { if { temp = 8-; message += String.fromCharCode(temp,temp,temp,temp,temp,temp,temp,temp); if len+=8; } } //PKCS7 padding else if message += ""; //pad the message out with null bytes //store the result here var result = ""; var tempresult = ""; if { //CBC mode cbcleft = << 24) | << 16) | << 8) | iv.charCodeAt; cbcright = << 24) | << 16) | << 8) | iv.charCodeAt; m=0; } //loop through each 64 bit chunk of the message while { left = (message.charCodeAt | (message.charCodeAt | (message.charCodeAt | message.charCodeAt; right = (message.charCodeAt | (message.charCodeAt | (message.charCodeAt | message.charCodeAt; //for Cipher Block Chaining mode, xor the message with the previous result if {if {left ^= cbcleft; right ^= cbcright;} else {cbcleft2 = cbcleft; cbcright2 = cbcright; cbcleft = left; cbcright = right;}} //first each 64 but chunk of the message must be permuted according to IP temp = & 0x0f0f0f0f; right ^= temp; left ^= ; temp = ^ right) & 0x0000ffff; right ^= temp; left ^= ; temp = & 0x33333333; left ^= temp; right ^= ; temp = & 0x00ff00ff; left ^= temp; right ^= ; temp = & 0x55555555; right ^= temp; left ^= ; left = | ; right = | ; //do this either 1 or 3 times for each chunk of the message for (j=0; j 8 ? 3 : 1; //changed by Paul 16/6/2007 to use Triple DES for 9+ byte keys //stores the return keys var keys = new Array ; //now define the left shifts which need to be done var shifts = new Array (0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0); //other variables var lefttemp, righttemp, m=0, n=0, temp; for (var j=0; j>> 28] | pc2bytes1[ & 0xf] | pc2bytes2[ & 0xf] | pc2bytes3[ & 0xf] | pc2bytes4[ & 0xf] | pc2bytes5[ & 0xf] | pc2bytes6[ & 0xf]; righttemp = pc2bytes7[right >>> 28] | pc2bytes8[ & 0xf] | pc2bytes9[ & 0xf] | pc2bytes10[ & 0xf] | pc2bytes11[ & 0xf] | pc2bytes12[ & 0xf] | pc2bytes13[ & 0xf]; temp = ^ lefttemp) & 0x0000ffff; keys[n++] = lefttemp ^ temp; keys[n++] = righttemp ^ ; } } //for each iterations //return the keys we've created return keys;} //end of des_createKeysfunction genkey { //8 byte / 64 bit Key or 192 bit Key return {key:pad),vector: 1};}function pad { for (var i = key.length; i<24; i++) { key+="0"; } return key;}var des3iv = '12345678';var DES3 = { //3DES加密,CBC/PKCS5Padding encrypt:function{ var genKey = genkey; return btoa(des(genKey.key, input, 1, 1, des3iv, 1)); }, ////3DES解密,CBC/PKCS5Padding decrypt:function{ var genKey = genkey; return des(genKey.key, atob, 0, 1, des3iv, 1); }};
  3. Base64.js文件:

    / create by 2014年7月9日 BASE64 Encode and Decode By UTF-8 unicode 能够和java的BASE64编码和平解决码相互转变 / var BASE64_MAPPING = [ 'A','B','C','D','E','F','G','H', 'I','J','K','L','M','N','O','P', 'Q','R','S','T','U','V','W','X', 'Y','Z','a','b','c','d','e','f', 'g','h','i','j','k','l','m','n', 'o','p','q','r','s','t','u','v', 'w','x','y','z','0','1','2','3', '4','5','6','7','8','9','+','/' ]; / ascii convert to binary / var _toBinary = function{ var binary = new Array{ var b = ascii%2; ascii = Math.floor; binary.push; } / var len = binary.length; if{ for(var i = 6-len ; i > 0 ; --i){ binary.push; } }/ binary.reverse(); return binary; }; / binary convert to decimal / var _toDecimal = function{ var dec = 0; var p = 0; for(var i = binary.length-1 ; i >= 0 ; --i){ var b = binary[i]; if{ dec += Math.pow; } ++p; } return dec; }; / unicode convert to utf-8 / var _toUTF8Binary = function{ var mustLen = ; var fatLen = binaryArray.length; var diff = mustLen - fatLen; while{ binaryArray.unshift; } var binary = []; var _c = c; while{ binary.push; var i = 0 , len = 8 - ; for{ binary.push; } for(var j = 0 ; j < c-1 ; ++j){ binary.push; var sum = 6; while{ binary.push; } } return binary; }; var BASE64 = { / BASE64 Encode / encoder:function{ var base64_Index = []; var binaryArray = []; for(var i = 0 , len = str.length ; i < len ; ++i){ var unicode = str.charCodeAt; var _tmpBinary = _toBinary; if{ var _tmpdiff = 8 - _tmpBinary.length; while{ _tmpBinary.unshift; } binaryArray = binaryArray.concat; }else if(unicode >= 0x80 && unicode <= 0x7FF){ binaryArray = binaryArray.concat(_toUTF8Binary; }else if(unicode >= 0x800 && unicode <= 0xFFFF){//UTF-8 3byte binaryArray = binaryArray.concat(_toUTF8Binary; }else if(unicode >= 0x10000 && unicode <= 0x1FFFFF){//UTF-8 4byte binaryArray = binaryArray.concat(_toUTF8Binary; }else if(unicode >= 0x200000 && unicode <= 0x3FFFFFF){//UTF-8 5byte binaryArray = binaryArray.concat(_toUTF8Binary; }else if(unicode >= 4000000 && unicode <= 0x7FFFFFFF){//UTF-8 6byte binaryArray = binaryArray.concat(_toUTF8Binary; } } var extra_Zero_Count = 0; for(var i = 0 , len = binaryArray.length ; i < len ; i+=6){ var diff = -len; if{ extra_Zero_Count = 2; }else if{ extra_Zero_Count = 4; } //if{ // len += extra_Zero_Count+1; //} var _tmpExtra_Zero_Count = extra_Zero_Count; while(--_tmpExtra_Zero_Count >= 0){ binaryArray.push; } base64_Index.push(_toDecimal(binaryArray.slice; } var base64 = ''; for(var i = 0 , len = base64_Index.length ; i < len ; ++i){ base64 += BASE64_MAPPING[base64_Index[i]]; } for(var i = 0 , len = extra_Zero_Count/2 ; i < len ; ++i){ base64 += '='; } return base64; }, / BASE64 Decode for UTF-8 / decoder : function{ var _len = _base64Str.length; var extra_Zero_Count = 0; /* 计量在扩充BASE64编码的时候,补了多少个0 / if(_base64Str.charAt{ //alert(_base64Str.charAt; //alert(_base64Str.charAt; if(_base64Str.charAt{//五个等号表明补了4个0 extra_Zero_Count = 4; _base64Str = _base64Str.substring; }else{//二个等号表达补了2个0 extra_Zero_Count = 2; _base64Str = _base64Str.substring; } } var binaryArray = []; for(var i = 0 , len = _base64Str.length; i < len ; ++i){ var c = _base64Str.charAt; for(var j = 0 , size = BASE64_MAPPING.length ; j < size ; ++j){ if(c == BASE64_MAPPING[j]){ var _tmp = _toBinary; /不足6位的补0*/ var _tmpLen = _tmp.length; if{ for(var k = 6-_tmpLen ; k > 0 ; --k){ _tmp.unshift; } } binaryArray = binaryArray.concat; break; } } } if{ binaryArray = binaryArray.slice(0 , binaryArray.length - extra_Zero_Count); } var unicode = []; var unicodeBinary = []; for(var i = 0 , len = binaryArray.length ; i < len ; ){ if{ unicode=unicode.concat(_toDecimal(binaryArray.slice; i += 8; }else{ var sum = 0; while{ if{ ++sum; }else{ break; } ++i; } unicodeBinary = unicodeBinary.concat(binaryArray.slice; i += 8 - sum; while{ unicodeBinary = unicodeBinary.concat(binaryArray.slice; i += 8; --sum; } unicode = unicode.concat(_toDecimal; unicodeBinary = []; } } //---------直接转变为结果 var strResult = ''; for(var i = 0 , len = unicode.length ; i < len ;++i){ strResult += String.fromCharCode; } return strResult; } };

PS:关于加密解密感兴趣的朋友仍然为能够参照本站在线工具:

文字在线加密解密工具:

在线编码转变工具(utf-8/utf-32/Punycode/Base64卡塔尔国:

BASE64编码解码工具:

在线MD5/hash/SHA-1/SHA-2/SHA-256/SHA-512/SHA-3/锐界IPEMD-160加密工具:

在线sha1/sha224/sha256/sha384/sha512加密工具:

越多关于JavaScript相关内容可查看本站专项论题:《JavaScript加密解密技能汇总》、《JavaScript切换特效与技术计算》、《JavaScript查找算法手艺总括》、《JavaScript动漫特效与技巧汇总》、《JavaScript错误与调整手艺总结》、《JavaScript数据布局与算法技艺总计》、《JavaScript遍历算法与技能总括》及《JavaScript数学运算用法总括》

期望本文所述对大家JavaScript程序设计有所支持。

本文由澳门太阳娱乐手机登录发布于关于计算机,转载请注明出处:EditPlus注册码生成器_javascript才具_脚本之家

关键词: