Changeset View
Changeset View
Standalone View
Standalone View
src/key.h
Show All 40 Lines | private: | ||||
//! Whether the public key corresponding to this private key is (to be) | //! Whether the public key corresponding to this private key is (to be) | ||||
//! compressed. | //! compressed. | ||||
bool fCompressed; | bool fCompressed; | ||||
//! The actual byte data | //! The actual byte data | ||||
std::vector<uint8_t, secure_allocator<uint8_t>> keydata; | std::vector<uint8_t, secure_allocator<uint8_t>> keydata; | ||||
//! Check whether the 32-byte array pointed to be vch is valid keydata. | //! Check whether the 32-byte array pointed to by vch is valid keydata. | ||||
static bool Check(const uint8_t *vch); | static bool Check(const uint8_t *vch); | ||||
public: | public: | ||||
//! Construct an invalid private key. | //! Construct an invalid private key. | ||||
CKey() : fValid(false), fCompressed(false) { | CKey() : fValid(false), fCompressed(false) { | ||||
// Important: vch must be 32 bytes in length to not break serialization | // Important: vch must be 32 bytes in length to not break serialization | ||||
keydata.resize(32); | keydata.resize(32); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 148 Lines • Show Last 20 Lines |