Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

CHashSigner Class Reference

Helper class for signing hashes and checking their signatures. More...

#include <messagesigner.h>

Static Public Member Functions

static bool SignHash (const uint256 &hash, const CKey &key, std::vector< unsigned char > &vchSigRet)
 Sign the hash, returns true if successful. More...
 
static bool VerifyHash (const uint256 &hash, const CPubKey &pubkey, const std::vector< unsigned char > &vchSig, std::string &strErrorRet)
 Verify the hash signature, returns true if succcessful. More...
 
static bool VerifyHash (const uint256 &hash, const CKeyID &keyID, const std::vector< unsigned char > &vchSig, std::string &strErrorRet)
 Verify the hash signature, returns true if succcessful. More...
 

Detailed Description

Helper class for signing hashes and checking their signatures.

Definition at line 27 of file messagesigner.h.

Member Function Documentation

◆ SignHash()

bool CHashSigner::SignHash ( const uint256 hash,
const CKey key,
std::vector< unsigned char > &  vchSigRet 
)
static

Sign the hash, returns true if successful.

Definition at line 47 of file messagesigner.cpp.

References CKey::SignCompact().

Referenced by CGovernanceVote::Sign(), CSporkMessage::Sign(), and CMessageSigner::SignMessage().

◆ VerifyHash() [1/2]

bool CHashSigner::VerifyHash ( const uint256 hash,
const CPubKey pubkey,
const std::vector< unsigned char > &  vchSig,
std::string &  strErrorRet 
)
static

Verify the hash signature, returns true if succcessful.

Definition at line 52 of file messagesigner.cpp.

References CPubKey::GetID().

Referenced by CheckHashSig(), CGovernanceVote::CheckSignature(), CSporkMessage::CheckSignature(), CGovernanceVote::Sign(), CSporkMessage::Sign(), and CMessageSigner::VerifyMessage().

◆ VerifyHash() [2/2]

bool CHashSigner::VerifyHash ( const uint256 hash,
const CKeyID keyID,
const std::vector< unsigned char > &  vchSig,
std::string &  strErrorRet 
)
static

Verify the hash signature, returns true if succcessful.

Definition at line 57 of file messagesigner.cpp.

References EncodeBase64(), CPubKey::GetID(), CPubKey::RecoverCompact(), strprintf, and base_blob< BITS >::ToString().


The documentation for this class was generated from the following files:
Released under the MIT license