Auto merge of #1706 - paragonie:master, r=bitcartel

Use libsodium's CSPRNG instead of OpenSSL's

Closes #1632.
This commit is contained in:
zkbot
2017-02-05 18:26:11 +00:00
9 changed files with 6 additions and 95 deletions

View File

@@ -814,13 +814,11 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
return false;
CKeyingMaterial vMasterKey;
RandAddSeedPerfmon();
vMasterKey.resize(WALLET_CRYPTO_KEY_SIZE);
GetRandBytes(&vMasterKey[0], WALLET_CRYPTO_KEY_SIZE);
CMasterKey kMasterKey;
RandAddSeedPerfmon();
kMasterKey.vchSalt.resize(WALLET_CRYPTO_SALT_SIZE);
GetRandBytes(&kMasterKey.vchSalt[0], WALLET_CRYPTO_SALT_SIZE);