Changeset View
Changeset View
Standalone View
Standalone View
src/pubkey.h
Show First 20 Lines • Show All 222 Lines • ▼ Show 20 Lines | template <typename Stream> void Unserialize(Stream &s) { | ||||
if (len != BIP32_EXTKEY_SIZE) { | if (len != BIP32_EXTKEY_SIZE) { | ||||
throw std::runtime_error("Invalid extended key size\n"); | throw std::runtime_error("Invalid extended key size\n"); | ||||
} | } | ||||
uint8_t code[BIP32_EXTKEY_SIZE]; | uint8_t code[BIP32_EXTKEY_SIZE]; | ||||
s.read((char *)&code[0], len); | s.read((char *)&code[0], len); | ||||
Decode(code); | Decode(code); | ||||
} | } | ||||
CExtPubKey() = default; | |||||
}; | }; | ||||
/** | /** | ||||
* Users of this module must hold an ECCVerifyHandle. The constructor and | * Users of this module must hold an ECCVerifyHandle. The constructor and | ||||
* destructor of these are not allowed to run in parallel, though. | * destructor of these are not allowed to run in parallel, though. | ||||
*/ | */ | ||||
class ECCVerifyHandle { | class ECCVerifyHandle { | ||||
static int refcount; | static int refcount; | ||||
public: | public: | ||||
ECCVerifyHandle(); | ECCVerifyHandle(); | ||||
~ECCVerifyHandle(); | ~ECCVerifyHandle(); | ||||
}; | }; | ||||
#endif // BITCOIN_PUBKEY_H | #endif // BITCOIN_PUBKEY_H |