From c97592e485138552cfe244a87e44a78093f0d692 Mon Sep 17 00:00:00 2001 From: Sky Johnson Date: Sat, 6 Sep 2025 20:20:32 -0500 Subject: [PATCH] Update rc4.cpp --- source/common/crypto/rc4.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/common/crypto/rc4.cpp b/source/common/crypto/rc4.cpp index 76735c1..3a6f1c7 100644 --- a/source/common/crypto/rc4.cpp +++ b/source/common/crypto/rc4.cpp @@ -2,14 +2,14 @@ // Licensed under GPL v3 #include "rc4.h" -#include -#include -#include +#include static constexpr std::array get_init_state() noexcept { std::array state{}; - std::iota(state.begin(), state.end(), 0); + for (std::size_t i = 0; i < 256; ++i) { + state[i] = static_cast(i); + } return state; }