![]() |
Master Core
v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
|
An encapsulated public key. More...
#include <key.h>
Public Member Functions | |
CPubKey () | |
template<typename T > | |
void | Set (const T pbegin, const T pend) |
template<typename T > | |
CPubKey (const T pbegin, const T pend) | |
CPubKey (const std::vector< unsigned char > &vch) | |
unsigned int | size () const |
const unsigned char * | begin () const |
const unsigned char * | end () const |
const unsigned char & | operator[] (unsigned int pos) const |
unsigned int | GetSerializeSize (int nType, int nVersion) const |
template<typename Stream > | |
void | Serialize (Stream &s, int nType, int nVersion) const |
template<typename Stream > | |
void | Unserialize (Stream &s, int nType, int nVersion) |
CKeyID | GetID () const |
uint256 | GetHash () const |
bool | IsValid () const |
bool | IsFullyValid () const |
bool | IsCompressed () const |
bool | Verify (const uint256 &hash, const std::vector< unsigned char > &vchSig) const |
bool | VerifyCompact (const uint256 &hash, const std::vector< unsigned char > &vchSig) const |
bool | RecoverCompact (const uint256 &hash, const std::vector< unsigned char > &vchSig) |
bool | Decompress () |
bool | Derive (CPubKey &pubkeyChild, unsigned char ccChild[32], unsigned int nChild, const unsigned char cc[32]) const |
Private Member Functions | |
void | Invalidate () |
Static Private Member Functions | |
unsigned static int | GetLen (unsigned char chHeader) |
Private Attributes | |
unsigned char | vch [65] |
Friends | |
bool | operator== (const CPubKey &a, const CPubKey &b) |
bool | operator!= (const CPubKey &a, const CPubKey &b) |
bool | operator< (const CPubKey &a, const CPubKey &b) |
|
inline |
Definition at line 64 of file key.h.
References Invalidate().
|
inline |
|
inline |
|
inline |
Definition at line 91 of file key.h.
References vch.
Referenced by mastercore::ClassB_send(), CScriptCompressor::Decompress(), Derive(), CKey::Derive(), CExtPubKey::Encode(), CScript::operator<<(), and CWalletDB::WriteKey().
bool CPubKey::Decompress | ( | ) |
Definition at line 482 of file key.cpp.
References IsValid().
Referenced by CScriptCompressor::Decompress().
bool CPubKey::Derive | ( | CPubKey & | pubkeyChild, |
unsigned char | ccChild[32], | ||
unsigned int | nChild, | ||
const unsigned char | cc[32] | ||
) | const |
Definition at line 527 of file key.cpp.
References begin(), BIP32Hash(), end(), IsValid(), and memcpy().
Referenced by CExtPubKey::Derive().
|
inline |
Definition at line 92 of file key.h.
References size().
Referenced by mastercore::ClassB_send(), Derive(), CKey::Derive(), CScript::operator<<(), and CWalletDB::WriteKey().
|
inline |
Definition at line 136 of file key.h.
References Hash(), and size().
Referenced by CCryptoKeyStore::AddKeyPubKey(), CCryptoKeyStore::EncryptKeys(), CCryptoKeyStore::GetKey(), and CCryptoKeyStore::Unlock().
|
inline |
Definition at line 131 of file key.h.
References Hash160(), and size().
Referenced by CCryptoKeyStore::AddCryptedKey(), CWallet::AddCryptedKey(), CBasicKeyStore::AddKeyPubKey(), CWallet::AddKeyPubKey(), AddressTableModel::addRow(), AppInit2(), CExtPubKey::Derive(), CExtKey::Derive(), ExtractDestination(), ExtractDestinations(), PaymentServer::fetchPaymentACK(), CWallet::GenerateNewKey(), GetAccountAddress(), CWallet::GetAllReserveKeys(), getnewaddress(), getrawchangeaddress(), HaveKeys(), importprivkey(), importwallet(), IsMine(), CWallet::LoadKeyMetadata(), SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked(), parseTransaction(), CWallet::ReserveKeyFromKeyPool(), SignN(), Solver(), and verifymessage().
|
inlinestaticprivate |
|
inlineprivate |
Definition at line 58 of file key.h.
Referenced by CPubKey(), Set(), and Unserialize().
|
inline |
Definition at line 151 of file key.h.
References size().
Referenced by CCryptoKeyStore::GetKey(), CKey::Load(), CCryptoKeyStore::Unlock(), CoinControlDialog::updateLabels(), CoinControlDialog::updateView(), and VerifyCompact().
bool CPubKey::IsFullyValid | ( | ) | const |
Definition at line 473 of file key.cpp.
References IsValid().
Referenced by _createmultisig_redeemScript(), mastercore::ClassB_send(), and CScriptCompressor::IsToPubKey().
|
inline |
Definition at line 143 of file key.h.
References size().
Referenced by CheckSig(), Decompress(), Derive(), GetAccountAddress(), CWallet::GetAllReserveKeys(), CReserveKey::GetReservedKey(), IsFullyValid(), CWallet::ReserveKeyFromKeyPool(), Verify(), and VerifyCompact().
|
inline |
bool CPubKey::RecoverCompact | ( | const uint256 & | hash, |
const std::vector< unsigned char > & | vchSig | ||
) |
Definition at line 448 of file key.cpp.
Referenced by SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked(), and verifymessage().
|
inline |
Definition at line 112 of file key.h.
References size(), and WriteCompactSize().
|
inline |
Definition at line 70 of file key.h.
References GetLen(), Invalidate(), and memcpy().
Referenced by CPubKey(), CExtPubKey::Decode(), and CScriptCompressor::IsToPubKey().
|
inline |
Definition at line 90 of file key.h.
References GetLen().
Referenced by CScriptCompressor::Decompress(), CExtPubKey::Encode(), end(), GetHash(), GetID(), GetSerializeSize(), IsCompressed(), IsValid(), CScript::operator<<(), Serialize(), and CWalletDB::WriteKey().
Definition at line 117 of file key.h.
References Invalidate(), and ReadCompactSize().
bool CPubKey::Verify | ( | const uint256 & | hash, |
const std::vector< unsigned char > & | vchSig | ||
) | const |
Definition at line 437 of file key.cpp.
References IsValid().
Referenced by CheckSig(), and CAlert::CheckSignature().
bool CPubKey::VerifyCompact | ( | const uint256 & | hash, |
const std::vector< unsigned char > & | vchSig | ||
) | const |
Definition at line 458 of file key.cpp.
References IsCompressed(), and IsValid().