@ -296,7 +296,7 @@ bool CWallet::LoadWatchOnly(const CScript &dest)
@@ -296,7 +296,7 @@ bool CWallet::LoadWatchOnly(const CScript &dest)
bool CWallet : : Unlock ( const SecureString & strWalletPassphrase )
{
CCrypter crypter ;
CKeyingMaterial vMasterKey ;
CKeyingMaterial _ vMasterKey;
{
LOCK ( cs_wallet ) ;
@ -304,9 +304,9 @@ bool CWallet::Unlock(const SecureString& strWalletPassphrase)
@@ -304,9 +304,9 @@ bool CWallet::Unlock(const SecureString& strWalletPassphrase)
{
if ( ! crypter . SetKeyFromPassphrase ( strWalletPassphrase , pMasterKey . second . vchSalt , pMasterKey . second . nDeriveIterations , pMasterKey . second . nDerivationMethod ) )
return false ;
if ( ! crypter . Decrypt ( pMasterKey . second . vchCryptedKey , vMasterKey ) )
if ( ! crypter . Decrypt ( pMasterKey . second . vchCryptedKey , _ vMasterKey) )
continue ; // try another master key
if ( CCryptoKeyStore : : Unlock ( vMasterKey ) )
if ( CCryptoKeyStore : : Unlock ( _ vMasterKey) )
return true ;
}
}
@ -322,14 +322,14 @@ bool CWallet::ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase,
@@ -322,14 +322,14 @@ bool CWallet::ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase,
Lock ( ) ;
CCrypter crypter ;
CKeyingMaterial vMasterKey ;
CKeyingMaterial _ vMasterKey;
BOOST_FOREACH ( MasterKeyMap : : value_type & pMasterKey , mapMasterKeys )
{
if ( ! crypter . SetKeyFromPassphrase ( strOldWalletPassphrase , pMasterKey . second . vchSalt , pMasterKey . second . nDeriveIterations , pMasterKey . second . nDerivationMethod ) )
return false ;
if ( ! crypter . Decrypt ( pMasterKey . second . vchCryptedKey , vMasterKey ) )
if ( ! crypter . Decrypt ( pMasterKey . second . vchCryptedKey , _ vMasterKey) )
return false ;
if ( CCryptoKeyStore : : Unlock ( vMasterKey ) )
if ( CCryptoKeyStore : : Unlock ( _ vMasterKey) )
{
int64_t nStartTime = GetTimeMillis ( ) ;
crypter . SetKeyFromPassphrase ( strNewWalletPassphrase , pMasterKey . second . vchSalt , pMasterKey . second . nDeriveIterations , pMasterKey . second . nDerivationMethod ) ;
@ -346,7 +346,7 @@ bool CWallet::ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase,
@@ -346,7 +346,7 @@ bool CWallet::ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase,
if ( ! crypter . SetKeyFromPassphrase ( strNewWalletPassphrase , pMasterKey . second . vchSalt , pMasterKey . second . nDeriveIterations , pMasterKey . second . nDerivationMethod ) )
return false ;
if ( ! crypter . Encrypt ( vMasterKey , pMasterKey . second . vchCryptedKey ) )
if ( ! crypter . Encrypt ( _ vMasterKey, pMasterKey . second . vchCryptedKey ) )
return false ;
CWalletDB ( strWalletFile ) . WriteMasterKey ( pMasterKey . first , pMasterKey . second ) ;
if ( fWasLocked )
@ -584,10 +584,10 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
@@ -584,10 +584,10 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
if ( IsCrypted ( ) )
return false ;
CKeyingMaterial vMasterKey ;
CKeyingMaterial _ vMasterKey;
vMasterKey . resize ( WALLET_CRYPTO_KEY_SIZE ) ;
GetStrongRandBytes ( & vMasterKey [ 0 ] , WALLET_CRYPTO_KEY_SIZE ) ;
_ vMasterKey. resize ( WALLET_CRYPTO_KEY_SIZE ) ;
GetStrongRandBytes ( & _ vMasterKey[ 0 ] , WALLET_CRYPTO_KEY_SIZE ) ;
CMasterKey kMasterKey ;
@ -610,7 +610,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
@@ -610,7 +610,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
if ( ! crypter . SetKeyFromPassphrase ( strWalletPassphrase , kMasterKey . vchSalt , kMasterKey . nDeriveIterations , kMasterKey . nDerivationMethod ) )
return false ;
if ( ! crypter . Encrypt ( vMasterKey , kMasterKey . vchCryptedKey ) )
if ( ! crypter . Encrypt ( _ vMasterKey, kMasterKey . vchCryptedKey ) )
return false ;
{
@ -628,7 +628,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
@@ -628,7 +628,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
pwalletdbEncryption - > WriteMasterKey ( nMasterKeyMaxID , kMasterKey ) ;
}
if ( ! EncryptKeys ( vMasterKey ) )
if ( ! EncryptKeys ( _ vMasterKey) )
{
if ( fFileBacked ) {
pwalletdbEncryption - > TxnAbort ( ) ;