diff --git a/src/bip39.cpp b/src/bip39.cpp index 07f5b74..9f25132 100644 --- a/src/bip39.cpp +++ b/src/bip39.cpp @@ -120,7 +120,7 @@ word_list generate_mnemonic(entropy_bits_t entropy /* = entropy_bits::_128 */, l assert((total_bits % BITS_PER_WORD) == 0); assert((word_count % MNEMONIC_WORD_MULTIPLE) == 0); - random_bytes_engine rbe; + random_bytes_engine rbe(std::random_device{}()); std::vector data(entropy_bits / BYTE_BITS); std::generate(begin(data), end(data), [&rbe]() { return static_cast(std::ref(rbe)()); }); return create_mnemonic(data, lang); diff --git a/src/include/bip39/word_list.h b/src/include/bip39/word_list.h index 502fad7..37b0608 100644 --- a/src/include/bip39/word_list.h +++ b/src/include/bip39/word_list.h @@ -1,6 +1,7 @@ #ifndef BIP39_WORD_LIST_H #define BIP39_WORD_LIST_H +#include #include #include