bitcoin/bitcoin — pull request #5319 by domob1812 (2014-11-20 08:00:23+00:00)
Title: 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.

Note that the verification of the public key was not done for `GetKey` before (only while unlocking). I don't think that it is a problem to check the validity of the key also in `GetKey`, though.