| 600 | } |
| 601 | |
| 602 | static bool DecryptMasterKey(const SecureString& wallet_passphrase, const CMasterKey& master_key, CKeyingMaterial& plain_master_key) |
| 603 | { |
| 604 | CCrypter crypter; |
| 605 | if (!crypter.SetKeyFromPassphrase(wallet_passphrase, master_key.vchSalt, master_key.nDeriveIterations, master_key.nDerivationMethod)) { |
| 606 | return false; |
| 607 | } |
| 608 | if (!crypter.Decrypt(master_key.vchCryptedKey, plain_master_key)) { |
| 609 | return false; |
| 610 | } |
| 611 | |
| 612 | return true; |
| 613 | } |
| 614 | |
| 615 | bool CWallet::Unlock(const SecureString& strWalletPassphrase) |
| 616 | { |
no test coverage detected