https://travis-ci.org/github/bitcoin/bitcoin/jobs/679885530#L8791
{
    CCrypter crypter;
    CKeyingMaterial _vMasterKey;
    {
        LOCK(cs_wallet);
        for (const MasterKeyMap::value_type& pMasterKey : mapMasterKeys)
        {
            if(!crypter.SetKeyFromPassphrase(strWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod))
                return false;
            if (!crypter.Decrypt(pMasterKey.second.vchCryptedKey, _vMasterKey))
                continue; 
            if (Unlock(_vMasterKey, accept_no_keys)) {
                
                UpgradeKeyMetadata();
                return true;
            }
        }
    }
    return false;
}
bool CWallet::ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase)