]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
polyseed: ensure alternative entropy is wiped before normal create
authortobtoht <tob@featherwallet.org>
Tue, 5 Dec 2023 21:09:19 +0000 (22:09 +0100)
committertobtoht <tob@featherwallet.org>
Tue, 5 Dec 2023 21:13:57 +0000 (22:13 +0100)
src/polyseed/polyseed.cpp

index ba100bed4c17bb34c3c6f27ddd40f7ed8d661dd3..b55206ccf72a872ec410ad9ee0e164cad7b2de52 100644 (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);