diff options
author | pasta <pasta@dashboost.org> | 2022-01-31 19:29:33 +0700 |
---|---|---|
committer | pasta <pasta@dashboost.org> | 2022-03-23 17:36:33 -0500 |
commit | 3ae7791bcaa88f5c68592673b8926ee807242ce7 (patch) | |
tree | a3c9f0be42e9082a9047f26d4eecb65b441e39a8 /src/wallet | |
parent | cea230eec40054a82fcd31fa97cf46f1585c4a35 (diff) |
refactor: use Span in random.*
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/test/wallet_crypto_tests.cpp | 2 | ||||
-rw-r--r-- | src/wallet/wallet.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/test/wallet_crypto_tests.cpp b/src/wallet/test/wallet_crypto_tests.cpp index 166e27bab9..327c28412a 100644 --- a/src/wallet/test/wallet_crypto_tests.cpp +++ b/src/wallet/test/wallet_crypto_tests.cpp @@ -81,7 +81,7 @@ BOOST_AUTO_TEST_CASE(passphrase) { std::string hash(GetRandHash().ToString()); std::vector<unsigned char> vchSalt(8); - GetRandBytes(vchSalt.data(), vchSalt.size()); + GetRandBytes(vchSalt); uint32_t rounds = InsecureRand32(); if (rounds > 30000) rounds = 30000; diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 261d042529..a64c56bf67 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -669,12 +669,12 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase) CKeyingMaterial _vMasterKey; _vMasterKey.resize(WALLET_CRYPTO_KEY_SIZE); - GetStrongRandBytes(_vMasterKey.data(), WALLET_CRYPTO_KEY_SIZE); + GetStrongRandBytes(_vMasterKey); CMasterKey kMasterKey; kMasterKey.vchSalt.resize(WALLET_CRYPTO_SALT_SIZE); - GetStrongRandBytes(kMasterKey.vchSalt.data(), WALLET_CRYPTO_SALT_SIZE); + GetStrongRandBytes(kMasterKey.vchSalt); CCrypter crypter; int64_t nStartTime = GetTimeMillis(); |