From 3a74895f48fce30209c8c424fb8ff8daed5e2b9f Mon Sep 17 00:00:00 2001 From: luzhisheng Date: Tue, 18 Mar 2025 23:30:29 +0800 Subject: [PATCH] =?UTF-8?q?fastmoss=202025=E7=89=88=E6=9C=AC=E7=A0=B4?= =?UTF-8?q?=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastmoss/2025test.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 fastmoss/2025test.js diff --git a/fastmoss/2025test.js b/fastmoss/2025test.js new file mode 100644 index 0000000..6877126 --- /dev/null +++ b/fastmoss/2025test.js @@ -0,0 +1,31 @@ +class S { + getSaltValue() { + return this.salt + } + encryptParams(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "" + , o = Object.keys(e).sort() + , n = ""; + o.forEach(t => { + n += t + e[t] + this.salt + } + ); + let r = '678fda83f6395c7fbca21c8e4817a2cc' //这部分加密完全可以用crypto去解决 + , i = "" + , a = 0 + , s = r.length - 1; + for (; a < r.length && !(a >= s); a++, + s--) + i += (parseInt(r[a], 16) ^ parseInt(r[s], 16)).toString(16); + return i + r.substring(a) + } + constructor() { + this.salt = "LAA6edGHBkcc3eTiOIRfg89bu9ODA6PB" + } +} +let A = new S; + +let d = {_time: 1742306633, cnonce: 48292081}; +h = A.encryptParams({...d}, S); + +console.log(h); \ No newline at end of file