diff --git a/generator.cpp b/generator.cpp index a2f6310..dcc9c83 100644 --- a/generator.cpp +++ b/generator.cpp @@ -55,13 +55,12 @@ auto Generator::reseed(const std::string& s) -> void { // ref: https://www.cryptopp.com/wiki/SecBlock std::string da_key(reinterpret_cast(&G.k[0]), G.k.SizeInBytes() * 8); // we need the size in bits - std::string to_be_hashed{da_key+s}; // fmt::print("s -> {}\n", s); // debugging // fmt::print("da_key -> {}\n", da_key); // debugging // fmt::print("concat \"da_key + s\" -> {}\n", to_be_hashed); // debugging try { - std::string a{fortuna::Util::do_sha(to_be_hashed)}; + std::string a{fortuna::Util::do_sha(da_key + s)}; std::memmove(&G.k[0], &a[0], G.k.SizeInBytes()); ++G.ctr; } catch(std::exception& e) {