| 129 | } |
| 130 | |
| 131 | static bool DecryptKey(const CKeyingMaterial& vMasterKey, const std::vector<unsigned char>& vchCryptedSecret, const CPubKey& vchPubKey, CKey& key) |
| 132 | { |
| 133 | CKeyingMaterial vchSecret; |
| 134 | if(!DecryptSecret(vMasterKey, vchCryptedSecret, vchPubKey.GetHash(), vchSecret)) |
| 135 | return false; |
| 136 | |
| 137 | if (vchSecret.size() != 32) |
| 138 | return false; |
| 139 | |
| 140 | key.Set(vchSecret.begin(), vchSecret.end(), vchPubKey.IsCompressed()); |
| 141 | return key.VerifyPubKey(vchPubKey); |
| 142 | } |
| 143 | |
| 144 | bool CCryptoKeyStore::SetCrypted() |
| 145 | { |
no test coverage detected