Clean up wallet encryption code.
Add a new method DecryptKey in crypter.cpp, that combines the logic for decrypting, initialising and validating a CKey object. This was previously duplicated.
This commit is contained in:
@@ -107,9 +107,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
bool EncryptSecret(const CKeyingMaterial& vMasterKey, const CKeyingMaterial &vchPlaintext, const uint256& nIV, std::vector<unsigned char> &vchCiphertext);
|
||||
bool DecryptSecret(const CKeyingMaterial& vMasterKey, const std::vector<unsigned char>& vchCiphertext, const uint256& nIV, CKeyingMaterial& vchPlaintext);
|
||||
|
||||
/** Keystore which keeps the private keys encrypted.
|
||||
* It derives from the basic key store, which is used if no encryption is active.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user