diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-05-10 14:09:11 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-05-10 14:15:35 +0000 |
commit | de27651f809256cd601bdc5d8015e5fe5fdd3556 (patch) | |
tree | 641a91a3704c2791cdae00dcc1010cfa74999343 /tests/unit_tests/mnemonics.cpp | |
parent | Merge pull request #5509 (diff) | |
download | monero-de27651f809256cd601bdc5d8015e5fe5fdd3556.tar.xz |
use crypto::rand instead of libc rand in a few tests
We don't need secure randomness here, but it should shut coverity up
Diffstat (limited to 'tests/unit_tests/mnemonics.cpp')
-rw-r--r-- | tests/unit_tests/mnemonics.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit_tests/mnemonics.cpp b/tests/unit_tests/mnemonics.cpp index 16634e7a1..51feb54e4 100644 --- a/tests/unit_tests/mnemonics.cpp +++ b/tests/unit_tests/mnemonics.cpp @@ -82,7 +82,7 @@ namespace crypto::secret_key randkey; for (size_t ii = 0; ii < sizeof(randkey); ++ii) { - randkey.data[ii] = rand(); + randkey.data[ii] = crypto::rand<uint8_t>(); } crypto::ElectrumWords::bytes_to_words(randkey, w_seed, language.get_language_name()); seed = std::string(w_seed.data(), w_seed.size()); @@ -256,4 +256,4 @@ TEST(mnemonics, partial_word_tolerance) res = crypto::ElectrumWords::words_to_bytes(seed_1, key_1, language_name_1); ASSERT_EQ(true, res); ASSERT_STREQ(language_name_1.c_str(), "English"); -}
\ No newline at end of file +} |