mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
use crypto::rand instead of libc rand in a few tests
We don't need secure randomness here, but it should shut coverity up
This commit is contained in:
parent
c0bc6d96cd
commit
de27651f80
3 changed files with 8 additions and 8 deletions
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue