14 #ifndef FABCOIN_BASE58_H 15 #define FABCOIN_BASE58_H 31 std::string
EncodeBase58(
const unsigned char* pbegin,
const unsigned char* pend);
36 std::string
EncodeBase58(
const std::vector<unsigned char>& vch);
43 bool DecodeBase58(
const char* psz, std::vector<unsigned char>& vchRet);
49 bool DecodeBase58(
const std::string& str, std::vector<unsigned char>& vchRet);
60 inline bool DecodeBase58Check(
const char* psz, std::vector<unsigned char>& vchRet);
66 inline bool DecodeBase58Check(
const std::string& str, std::vector<unsigned char>& vchRet);
78 typedef std::vector<unsigned char, zero_after_free_allocator<unsigned char> >
vector_uchar;
82 void SetData(
const std::vector<unsigned char> &vchVersionIn,
const void* pdata,
size_t nSize);
83 void SetData(
const std::vector<unsigned char> &vchVersionIn,
const unsigned char *pbegin,
const unsigned char *pend);
86 bool SetString(
const char* psz,
unsigned int nVersionBytes = 1);
106 bool Set(
const CKeyID &
id);
109 bool IsValid()
const;
118 bool GetKeyID(
CKeyID &keyID)
const;
119 bool IsScript()
const;
120 bool IsPubKeyHash()
const;
129 void SetKey(
const CKey& vchSecret);
131 bool IsValid()
const;
133 bool SetString(
const std::string& strSecret);
143 unsigned char vch[Size];
171 #endif // FABCOIN_BASE58_H A base58-encoded secret key.
CFabcoinSecret(const CKey &vchSecret)
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
A txout script template with a specific destination.
bool DecodeBase58(const char *psz, std::vector< unsigned char > &vchRet)
Decode a base58-encoded string (psz) into a byte vector (vchRet).
base58-encoded Fabcoin addresses.
CChainParams defines various tweakable parameters of a given instance of the Fabcoin system...
bool DecodeBase58Check(const char *psz, std::vector< unsigned char > &vchRet)
Decode a base58-encoded string (psz) that includes a checksum into a byte vector (vchRet), return true if decoding is successful.
void SetData(const std::vector< unsigned char > &vchVersionIn, const void *pdata, size_t nSize)
const std::vector< unsigned char > & Base58Prefix(Base58Type type) const
std::vector< unsigned char, zero_after_free_allocator< unsigned char > > vector_uchar
the actually encoded data
Base class for all base58-encoded data.
CFabcoinExtKeyBase(const K &key)
bool operator==(const CBase58Data &b58) const
std::string ToString() const
CFabcoinAddress(const std::string &strAddress)
bool operator>(const CBase58Data &b58) const
void SetKey(const K &key)
bool SetString(const char *psz, unsigned int nVersionBytes=1)
std::string EncodeBase58Check(const std::vector< unsigned char > &vchIn)
Encode a byte vector into a base58-encoded string, including checksum.
CFabcoinExtKeyBase< CExtPubKey, BIP32_EXTKEY_SIZE, CChainParams::EXT_PUBLIC_KEY > CFabcoinExtPubKey
const CChainParams & Params()
Return the currently selected parameters.
A reference to a CKey: the Hash160 of its serialized public key.
std::string EncodeBase58(const unsigned char *pbegin, const unsigned char *pend)
Why base-58 instead of standard base-64 encoding?
A reference to a CScript: the Hash160 of its serialization (see script.h)
bool operator<(const CBase58Data &b58) const
CFabcoinAddress(const char *pszAddress)
An encapsulated private key.
CFabcoinAddress(const CTxDestination &dest)
CFabcoinExtKeyBase(const std::string &strBase58c)
std::vector< unsigned char > vchVersion
the version byte(s)
bool operator<=(const CBase58Data &b58) const
CFabcoinExtKeyBase< CExtKey, BIP32_EXTKEY_SIZE, CChainParams::EXT_SECRET_KEY > CFabcoinExtKey
int CompareTo(const CBase58Data &b58) const
bool operator>=(const CBase58Data &b58) const