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; }