generator: resize dst string to needed size
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
3d22b8de8b
commit
b3c1033e6a
|
@ -163,6 +163,8 @@ auto Generator::generate_random_data(uint n) -> std::string {
|
|||
std::string nu_G_k{generate_blocks(2)};
|
||||
// fmt::print("nu_G_k: {}\n", nu_G_k); // debugging
|
||||
std::string dst;
|
||||
// FIXME: +1 for the actual null-termination, not exactly sure if needed
|
||||
dst.resize(G.k_length + 1);
|
||||
CryptoPP::StringSource str_s(
|
||||
nu_G_k,true,new CryptoPP::HexDecoder(new CryptoPP::StringSink(dst))
|
||||
);
|
||||
|
|
Reference in New Issue