generator: add std::array<std::byte, 16> counter
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c9218e47e8
commit
715523eb1a
|
@ -6,6 +6,7 @@
|
||||||
#include <cryptopp/secblock.h>
|
#include <cryptopp/secblock.h>
|
||||||
#include <cryptopp/serpent.h>
|
#include <cryptopp/serpent.h>
|
||||||
|
|
||||||
|
#include <array>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
@ -48,11 +49,14 @@ private:
|
||||||
struct G_state {
|
struct G_state {
|
||||||
// 32*8
|
// 32*8
|
||||||
static constexpr const std::size_t k_length{32};
|
static constexpr const std::size_t k_length{32};
|
||||||
|
static constexpr const std::size_t ctr_len{16};
|
||||||
|
|
||||||
CryptoPP::FixedSizeSecBlock<CryptoPP::byte, k_length> k;
|
CryptoPP::FixedSizeSecBlock<CryptoPP::byte, k_length> k;
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wpedantic"
|
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||||
unsigned __int128 ctr;
|
unsigned __int128 ctr;
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
std::array<std::byte, ctr_len> counter;
|
||||||
};
|
};
|
||||||
G_state G;
|
G_state G;
|
||||||
|
|
||||||
|
|
Reference in New Issue