polyseed: ensure alternative entropy is wiped before normal create

This commit is contained in:
tobtoht 2023-12-05 22:09:19 +01:00
parent e40d4efd54
commit 3dd6dbc9ba
No known key found for this signature in database
GPG key ID: E45B10DD027D2472

View file

@ -131,6 +131,7 @@ namespace polyseed {
void data::create(feature_type features) {
check_init();
sodium_memzero(seed, POLYSEED_RANDBYTES);
auto status = polyseed_create(features, &m_data);
if (status != POLYSEED_OK) {
throw get_error(status);