fortuna: wrap pool initialization in a try-catch

This commit is contained in:
surtur 2021-12-07 02:48:37 +01:00
parent bc5bb6e700
commit b96ce5d644
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -27,7 +27,12 @@ public:
// TODO(me): handle the reseeds here as per Cryptography Engineering,
// p. 153
set_reseed_ctr_to_null();
R.initialize_pools();
try {
R.initialize_pools();
fmt::print("pools initialized\n");
} catch(std::exception& e) {
fmt::print("{}\n", e.what());
}
fmt::print("PRNG initialized\n");
};