update rc4 相关
This commit is contained in:
parent
2360870995
commit
654f1e68a4
@ -12374,38 +12374,39 @@ Y.RC4.prototype = {
|
|||||||
},
|
},
|
||||||
bO(a) {
|
bO(a) {
|
||||||
// update
|
// update
|
||||||
var s, r, q, p, o, n = this,
|
var s, r, q, p, o, this_ = this,
|
||||||
m = a.length
|
m = a.length
|
||||||
for (s = 0; s < m; ++s) {
|
for (s = 0; s < m; ++s) {
|
||||||
r = n.a = n.a + 1 & 255
|
r = this_.a = this_.a + 1 & 255
|
||||||
q = n.b
|
q = this_.b
|
||||||
p = n.c
|
p = this_.c
|
||||||
o = p[r]
|
o = p[r]
|
||||||
q = n.b = q + o & 255
|
q = this_.b = q + o & 255
|
||||||
p[r] = p[q]
|
p[r] = p[q]
|
||||||
p[q] = o
|
p[q] = o
|
||||||
a[s] = (a[s] ^ p[p[r] + p[q] & 255]) >>> 0
|
a[s] = (a[s] ^ p[p[r] + p[q] & 255]) >>> 0
|
||||||
n.b = q + a[s] & 255
|
this_.b = q + a[s] & 255
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
di(a) {
|
di(a) {
|
||||||
// init?
|
// init?
|
||||||
var s, r, q, p, o, n, m = this,
|
var s, r, q, p, o, n, this_ = this,
|
||||||
l = a.length
|
l = a.length
|
||||||
for (s = 0; s < l; ++s) {
|
for (s = 0; s < l; ++s) {
|
||||||
r = m.a = m.a + 1 & 255
|
r = this_.a = this_.a + 1 & 255
|
||||||
q = m.b
|
q = this_.b
|
||||||
p = m.c
|
p = this_.c
|
||||||
o = p[r]
|
o = p[r]
|
||||||
q = m.b = q + o & 255
|
q = this_.b = q + o & 255
|
||||||
p[r] = p[q]
|
p[r] = p[q]
|
||||||
p[q] = o
|
p[q] = o
|
||||||
n = a[s]
|
n = a[s]
|
||||||
a[s] = (n ^ p[p[r] + p[q] & 255]) >>> 0
|
a[s] = (n ^ p[p[r] + p[q] & 255]) >>> 0
|
||||||
m.b = q + n & 255
|
this_.b = q + n & 255
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
n() {
|
n() {
|
||||||
|
// nextByte
|
||||||
// next byte from ShadowR
|
// next byte from ShadowR
|
||||||
var _this = this,
|
var _this = this,
|
||||||
r = _this.a = _this.a + 1 & 255,
|
r = _this.a = _this.a + 1 & 255,
|
||||||
@ -19163,16 +19164,17 @@ LangData.SuperRC4.prototype = {
|
|||||||
return (this.n() << 8 | this.n()) >>> 0
|
return (this.n() << 8 | this.n()) >>> 0
|
||||||
},
|
},
|
||||||
ax(a) {
|
ax(a) {
|
||||||
var s, r
|
// nextInt
|
||||||
|
var n, round
|
||||||
if (a === 0) return 0
|
if (a === 0) return 0
|
||||||
s = this.n()
|
n = this.n()
|
||||||
r = a
|
round = a
|
||||||
do {
|
do {
|
||||||
s = (s << 8 | this.n()) >>> 0
|
n = (n << 8 | this.n()) >>> 0
|
||||||
if (s >= a) s = C.JsInt.V(s, a)
|
if (n >= a) n = C.JsInt.V(n, a)
|
||||||
r = C.JsInt.am(r, 8)
|
round = C.JsInt.am(round, 8)
|
||||||
} while (r !== 0)
|
} while (round !== 0)
|
||||||
return s
|
return n
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LangData.k_.prototype = {
|
LangData.k_.prototype = {
|
||||||
|
Loading…
Reference in New Issue
Block a user