68js加密防并发谁能并发我叫谁爹

This commit is contained in:
luzhisheng 2023-04-06 17:10:14 +08:00
parent dd619a9745
commit 88758ccce5

View File

@ -0,0 +1,23 @@
const wp = require('whirlpool-js');
function hex_1_str(data){
for (var s = 0; s <= 25000000; s++) {
result = wp.encSync(data.r + s.toString(), "hex");
if (result.slice(0, 10) === data.c) {
break;
}
}
return s;
}
// const data = {"uuid": "e4c958f2d45611eda02c52540078cc4c", "c": "787aaa89c8", "r": "UCHQwxAwjX", "t": "eCOZi8Zg31uZsXxm3WKyeKSNRhrHh5RGCd+XifzvIwM="}
//
// a = hex_1_str(data);
// console.log(a);
module.exports =
{
hex_1_str
};