 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
6 #ifndef MESSAGESIGNER_H
7 #define MESSAGESIGNER_H
19 static bool SignMessage(
const std::string& strMessage, std::vector<unsigned char>& vchSigRet,
const CKey&
key);
21 static bool VerifyMessage(
const CPubKey& pubkey,
const std::vector<unsigned char>& vchSig,
const std::string& strMessage, std::string& strErrorRet);
23 static bool VerifyMessage(
const CKeyID& keyID,
const std::vector<unsigned char>& vchSig,
const std::string& strMessage, std::string& strErrorRet);
34 static bool VerifyHash(
const uint256& hash,
const CPubKey& pubkey,
const std::vector<unsigned char>& vchSig, std::string& strErrorRet);
36 static bool VerifyHash(
const uint256& hash,
const CKeyID& keyID,
const std::vector<unsigned char>& vchSig, std::string& strErrorRet);
A reference to a CKey: the Hash160 of its serialized public key.
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.
Helper class for signing hashes and checking their signatures.
static bool SignMessage(const std::string &strMessage, std::vector< unsigned char > &vchSigRet, const CKey &key)
Sign the message, 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.
Helper class for signing messages and checking their signatures.
256-bit unsigned big integer.
static bool GetKeysFromSecret(const std::string &strSecret, CKey &keyRet, CPubKey &pubkeyRet)
Set the private/public key values, returns true if successful.
An encapsulated public key.
An encapsulated private key.
static bool SignHash(const uint256 &hash, const CKey &key, std::vector< unsigned char > &vchSigRet)
Sign the hash, returns true if successful.