Update rc4.cpp

This commit is contained in:
Sky Johnson 2025-09-06 20:20:32 -05:00
parent 9ad949a760
commit c97592e485

View File

@ -2,14 +2,14 @@
// Licensed under GPL v3 // Licensed under GPL v3
#include "rc4.h" #include "rc4.h"
#include <algorithm> #include <cstddef>
#include <cstring>
#include <numeric>
static constexpr std::array<uchar, 256> get_init_state() noexcept static constexpr std::array<uchar, 256> get_init_state() noexcept
{ {
std::array<uchar, 256> state{}; std::array<uchar, 256> state{};
std::iota(state.begin(), state.end(), 0); for (std::size_t i = 0; i < 256; ++i) {
state[i] = static_cast<uchar>(i);
}
return state; return state;
} }