From 1d448dbb4145f69c313c4646776a35724a5dc167 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Sun, 8 Dec 2024 20:41:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=95=E8=AF=95=E8=A1=8C=E4=B8=8D=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- branch/latest/md5.js | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/branch/latest/md5.js b/branch/latest/md5.js index a887b46..3eea525 100644 --- a/branch/latest/md5.js +++ b/branch/latest/md5.js @@ -8467,15 +8467,24 @@ Y.RC4.prototype = { n() { // nextByte // next byte from ShadowR - var _this = this, - r = _this.a = _this.a + 1 & 255, - q = _this.b, - p = _this.c, - o = p[r] - q = _this.b = q + o & 255 - p[r] = p[q] - p[q] = o - return p[p[r] + p[q] & 255] + // var _this = this, + // r = _this.a = _this.a + 1 & 255, + // q = _this.b, + // p = _this.c, + // o = p[r] + // q = _this.b = q + o & 255 + // p[r] = p[q] + // p[q] = o + // return p[p[r] + p[q] & 255] + + const r = this.a = (this.a + 1) & 255; + let q = this.b; + const p = this.c; + const o = p[r]; + q = this.b = (q + o) & 255; + p[r] = p[q]; + p[q] = o; + return p[(p[r] + p[q]) & 255]; } } var HtmlRenderer = {