Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
key.h
Go to the documentation of this file.
117 bool Sign(const uint256& hash, std::vector<unsigned char>& vchSig, uint32_t test_case = 0) const;
129 bool Derive(CKey& keyChild, ChainCode &ccChild, unsigned int nChild, const ChainCode& cc) const;
CPrivKey GetPrivKey() const
Convert the private key to a CPrivKey (serialized OpenSSL private key data).
Definition: key.cpp:166
void WriteCompactSize(CSizeComputer &os, uint64_t nSize)
Definition: serialize.h:1289
bool VerifyPubKey(const CPubKey &vchPubKey) const
Verify thoroughly whether a private key and a public key match.
Definition: key.cpp:207
static const unsigned int COMPRESSED_PRIVATE_KEY_SIZE
Definition: key.h:34
bool Sign(const uint256 &hash, std::vector< unsigned char > &vchSig, uint32_t test_case=0) const
Create a DER-serialized signature.
Definition: key.cpp:192
bool SignCompact(const uint256 &hash, std::vector< unsigned char > &vchSig) const
Create a compact signature (65 bytes), which allows reconstructing the used public key...
Definition: key.cpp:221
std::vector< unsigned char, secure_allocator< unsigned char > > CPrivKey
secure_allocator is defined in allocators.h CPrivKey is a serialized private key, with all parameters...
Definition: key.h:24
void MakeNewKey(bool fCompressed)
Generate a new private key using a cryptographic PRNG.
Definition: key.cpp:158
bool IsCompressed() const
Check whether the public key corresponding to this private key is (to be) compressed.
Definition: key.h:96
void Set(const T pbegin, const T pend, bool fCompressedIn)
Initialize using begin and end iterators to byte data.
Definition: key.h:74
bool Derive(CKey &keyChild, ChainCode &ccChild, unsigned int nChild, const ChainCode &cc) const
Derive BIP32 child key.
Definition: key.cpp:248
bool fCompressed
Whether the public key corresponding to this private key is (to be) compressed.
Definition: key.h:49
void SetMaster(const unsigned char *seed, unsigned int nSeedLen)
Definition: key.cpp:276
std::vector< unsigned char, secure_allocator< unsigned char > > keydata
The actual byte data.
Definition: key.h:52
static bool Check(const unsigned char *vch)
Check whether the 32-byte array pointed to by vch is valid keydata.
Definition: key.cpp:154
Definition: pubkey.h:200
bool ECC_InitSanityCheck(void)
Check that required EC support is available at runtime.
Definition: key.cpp:316
bool Load(const CPrivKey &privkey, const CPubKey &vchPubKey, bool fSkipCheck)
Load private key and check that public key matches.
Definition: key.cpp:236