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:
Daniel Kraft
2014-12-04 21:37:26 +01:00
parent 9ddc8c63ab
commit 35f7227a86
2 changed files with 17 additions and 25 deletions

View File

@@ -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.
*/