Changeset View
Changeset View
Standalone View
Standalone View
src/pubkey.h
Show All 27 Lines | |||||
typedef uint256 ChainCode; | typedef uint256 ChainCode; | ||||
/** An encapsulated public key. */ | /** An encapsulated public key. */ | ||||
class CPubKey { | class CPubKey { | ||||
public: | public: | ||||
/** | /** | ||||
* secp256k1: | * secp256k1: | ||||
*/ | */ | ||||
static const unsigned int PUBLIC_KEY_SIZE = 65; | static constexpr unsigned int PUBLIC_KEY_SIZE = 65; | ||||
static const unsigned int COMPRESSED_PUBLIC_KEY_SIZE = 33; | static constexpr unsigned int COMPRESSED_PUBLIC_KEY_SIZE = 33; | ||||
static const unsigned int SIGNATURE_SIZE = 72; | static constexpr unsigned int SIGNATURE_SIZE = 72; | ||||
static const unsigned int COMPACT_SIGNATURE_SIZE = 65; | static constexpr unsigned int COMPACT_SIGNATURE_SIZE = 65; | ||||
/** | /** | ||||
* see www.keylength.com | * see www.keylength.com | ||||
* script supports up to 75 for single byte push | * script supports up to 75 for single byte push | ||||
*/ | */ | ||||
static_assert(PUBLIC_KEY_SIZE >= COMPRESSED_PUBLIC_KEY_SIZE, | static_assert(PUBLIC_KEY_SIZE >= COMPRESSED_PUBLIC_KEY_SIZE, | ||||
"COMPRESSED_PUBLIC_KEY_SIZE is larger than PUBLIC_KEY_SIZE"); | "COMPRESSED_PUBLIC_KEY_SIZE is larger than PUBLIC_KEY_SIZE"); | ||||
private: | private: | ||||
▲ Show 20 Lines • Show All 197 Lines • Show Last 20 Lines |