用起来也简单,破起来也简单。重要的是,思路在这,里面加加减减,自己弄就好了。是吧。
看代码吧
import console; var currentUser = "523123123"; math.randomize(); function encryptDate( dateTick, currentUser ){ var cryptNum = tonumber(currentUser) * tonumber(string.left(currentUser,1)); //取加密日期 var rstr=string.split("ABCDEFGHIJKLMNOPQRSTUVWXYZ",""); var tick = tostring( dateTick + cryptNum); var tb = {}; for(i=1;#tick;1){ table.push( tb, rstr[math.random(1, #rstr)] ++ tick[[i]] ); } var tickStr = string.reverse(string.join(tb)); return tickStr; } function decryptDate( cryptStr, currentUser ){ var cryptNum = tonumber(currentUser) * tonumber(string.left(currentUser,1)); num = string.reverse( string.replace(cryptStr,"[A-Z]+","") ); num = tonumber( num ) - cryptNum ; return num, time(num); } var jiami = encryptDate( 1468587705, currentUser ) console.log( jiami ); var jiemi = decryptDate( jiami, currentUser ) console.log( jiemi ); console.pause(true);
发表评论