| 311 | } |
| 312 | |
| 313 | bool CKey::Load(const CPrivKey &seckey, const CPubKey &vchPubKey, bool fSkipCheck=false) { |
| 314 | if (!ec_seckey_import_der(secp256k1_context_sign, (unsigned char*)begin(), seckey.data(), seckey.size())) |
| 315 | return false; |
| 316 | fCompressed = vchPubKey.IsCompressed(); |
| 317 | fValid = true; |
| 318 | |
| 319 | if (fSkipCheck) |
| 320 | return true; |
| 321 | |
| 322 | return VerifyPubKey(vchPubKey); |
| 323 | } |
| 324 | |
| 325 | bool CKey::Derive(CKey& keyChild, ChainCode &ccChild, unsigned int nChild, const ChainCode& cc, std::vector<unsigned char>* tweak) const { |
| 326 | assert(IsValid()); |
nothing calls this directly
no test coverage detected