diff options
Diffstat (limited to 'core/fdrm/crypto/fx_crypt.cpp')
-rw-r--r-- | core/fdrm/crypto/fx_crypt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fdrm/crypto/fx_crypt.cpp b/core/fdrm/crypto/fx_crypt.cpp index f4ead91d33..f5ebdf09d2 100644 --- a/core/fdrm/crypto/fx_crypt.cpp +++ b/core/fdrm/crypto/fx_crypt.cpp @@ -143,11 +143,11 @@ void CRYPT_ArcFourSetup(CRYPT_rc4_context* s, uint32_t length) { s->x = 0; s->y = 0; - for (int i = 0; i < 256; ++i) + for (int i = 0; i < kRC4ContextPermutationLength; ++i) s->m[i] = i; int j = 0; - for (int i = 0; i < 256; ++i) { + for (int i = 0; i < kRC4ContextPermutationLength; ++i) { j = (j + s->m[i] + (length ? key[i % length] : 0)) & 0xFF; std::swap(s->m[i], s->m[j]); } |