5 #ifndef MESSAGESIGNER_H 6 #define MESSAGESIGNER_H 18 static bool SignMessage(
const std::string strMessage, std::vector<unsigned char>& vchSigRet,
const CKey key);
20 static bool VerifyMessage(
const CPubKey pubkey,
const std::vector<unsigned char>& vchSig,
const std::string strMessage, std::string& strErrorRet);
31 static bool VerifyHash(
const uint256& hash,
const CPubKey pubkey,
const std::vector<unsigned char>& vchSig, std::string& strErrorRet);
static bool GetKeysFromSecret(const std::string strSecret, CKey &keyRet, CPubKey &pubkeyRet)
Set the private/public key values, returns true if successful.
static bool VerifyMessage(const CPubKey pubkey, const std::vector< unsigned char > &vchSig, const std::string strMessage, std::string &strErrorRet)
Verify the message signature, returns true if succcessful.
static bool SignHash(const uint256 &hash, const CKey key, std::vector< unsigned char > &vchSigRet)
Sign the hash, returns true if successful.
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.
static bool SignMessage(const std::string strMessage, std::vector< unsigned char > &vchSigRet, const CKey key)
Sign the message, returns true if successful.