@ -280,7 +280,7 @@ bool CWallet::LoadWatchOnly(const CScript &dest)
@@ -280,7 +280,7 @@ bool CWallet::LoadWatchOnly(const CScript &dest)
bool CWallet : : Unlock ( const SecureString & strWalletPassphrase )
{
CCrypter crypter ;
CKeyingMaterial vMasterKey ;
CKeyingMaterial _ vMasterKey;
{
LOCK ( cs_wallet ) ;
@ -288,9 +288,9 @@ bool CWallet::Unlock(const SecureString& strWalletPassphrase)
@@ -288,9 +288,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 ;
}
}
@ -306,14 +306,14 @@ bool CWallet::ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase,
@@ -306,14 +306,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 ) ;
@ -330,7 +330,7 @@ bool CWallet::ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase,
@@ -330,7 +330,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 )
@ -561,10 +561,10 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
@@ -561,10 +561,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 ;
@ -587,7 +587,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
@@ -587,7 +587,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 ;
{
@ -605,7 +605,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
@@ -605,7 +605,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
pwalletdbEncryption - > WriteMasterKey ( nMasterKeyMaxID , kMasterKey ) ;
}
if ( ! EncryptKeys ( vMasterKey ) )
if ( ! EncryptKeys ( _ vMasterKey) )
{
if ( fFileBacked ) {
pwalletdbEncryption - > TxnAbort ( ) ;