| 212 | } |
| 213 | |
| 214 | uint256 CKey::ECDH(const CPubKey& pubkey) const { |
| 215 | assert(fValid); |
| 216 | uint256 result; |
| 217 | secp256k1_pubkey pkey; |
| 218 | assert(secp256k1_ec_pubkey_parse(secp256k1_context_sign, &pkey, pubkey.begin(), pubkey.size())); |
| 219 | assert(secp256k1_ecdh(secp256k1_context_sign, result.begin(), &pkey, begin(), NULL, NULL)); |
| 220 | return result; |
| 221 | } |
| 222 | |
| 223 | bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, bool grind, uint32_t test_case) const { |
| 224 | if (!fValid) |
no test coverage detected