| 254 | } |
| 255 | |
| 256 | bool CKey::Load(const CPrivKey &privkey, const CPubKey &vchPubKey, bool fSkipCheck=false) { |
| 257 | if (!ec_privkey_import_der(secp256k1_context_sign, (unsigned char*)begin(), privkey.data(), privkey.size())) |
| 258 | return false; |
| 259 | fCompressed = vchPubKey.IsCompressed(); |
| 260 | fValid = true; |
| 261 | |
| 262 | if (fSkipCheck) |
| 263 | return true; |
| 264 | |
| 265 | return VerifyPubKey(vchPubKey); |
| 266 | } |
| 267 | |
| 268 | bool CKey::Derive(CKey& keyChild, ChainCode &ccChild, unsigned int nChild, const ChainCode& cc) const { |
| 269 | assert(IsValid()); |
no test coverage detected