generator: rm misplaced G.k wipe
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
d4c7c61ac4
commit
51c0b1fc56
|
@ -92,6 +92,7 @@ auto Generator::do_crypto() -> std::string {
|
|||
// 16 bytes --> 128bit
|
||||
static constexpr const std::size_t ctr_length{16};
|
||||
CryptoPP::FixedSizeSecBlock<CryptoPP::byte, ctr_length> ctr;
|
||||
// FIXME: potential (pretty-much) UB
|
||||
std::memmove(&ctr, &G.ctr, ctr_length);
|
||||
|
||||
try {
|
||||
|
@ -135,14 +136,6 @@ auto Generator::generate_blocks(unsigned int k_blocks) -> std::string {
|
|||
r += do_crypto();
|
||||
++G.ctr;
|
||||
}
|
||||
try {
|
||||
std::string da_key{""};
|
||||
da_key.resize(G.k.size());
|
||||
std::memmove(&da_key[0], &G.k[0], G.k_length);
|
||||
da_key.clear();
|
||||
} catch(std::exception& e) {
|
||||
fmt::print("{}", e.what());
|
||||
}
|
||||
// fmt::print("r from generate_blocks -> {}\n", r); // debugging
|
||||
return r;
|
||||
}
|
||||
|
|
Reference in New Issue