14 #ifndef BITCOIN_BASE58_H
15 #define BITCOIN_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);
132 bool SetString(
const std::string& strSecret);
142 unsigned char vch[Size];
bool DecodeBase58(const char *psz, std::vector< unsigned char > &vchRet)
Decode a base58-encoded string (psz) into a byte vector (vchRet).
CBitcoinExtKeyBase< CExtPubKey, BIP32_EXTKEY_SIZE, CChainParams::EXT_PUBLIC_KEY > CBitcoinExtPubKey
std::string EncodeBase58(const unsigned char *pbegin, const unsigned char *pend)
Why base-58 instead of standard base-64 encoding?
std::string EncodeBase58Check(const std::vector< unsigned char > &vchIn)
Encode a byte vector into a base58-encoded string, including checksum.
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),...
CBitcoinExtKeyBase< CExtKey, BIP32_EXTKEY_SIZE, CChainParams::EXT_SECRET_KEY > CBitcoinExtKey
const CChainParams & Params()
Return the currently selected parameters.
Base class for all base58-encoded data.
bool operator>=(const CBase58Data &b58) const
std::vector< unsigned char > vchVersion
the version byte(s)
std::vector< unsigned char, zero_after_free_allocator< unsigned char > > vector_uchar
the actually encoded data
bool operator<=(const CBase58Data &b58) const
bool SetString(const char *psz, unsigned int nVersionBytes=1)
bool operator==(const CBase58Data &b58) const
bool operator<(const CBase58Data &b58) const
bool operator>(const CBase58Data &b58) const
std::string ToString() const
int CompareTo(const CBase58Data &b58) const
void SetData(const std::vector< unsigned char > &vchVersionIn, const void *pdata, size_t nSize)
base58-encoded Bitcoin addresses.
CTxDestination Get() const
CBitcoinAddress(const std::string &strAddress)
CBitcoinAddress(const CTxDestination &dest)
bool Set(const CKeyID &id)
CBitcoinAddress(const char *pszAddress)
bool GetKeyID(CKeyID &keyID) const
CBitcoinExtKeyBase(const K &key)
void SetKey(const K &key)
CBitcoinExtKeyBase(const std::string &strBase58c)
A base58-encoded secret key.
CBitcoinSecret(const CKey &vchSecret)
void SetKey(const CKey &vchSecret)
bool SetString(const char *pszSecret)
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system.
An encapsulated private key.
A reference to a CKey: the Hash160 of its serialized public key.
A reference to a CScript: the Hash160 of its serialization (see script.h)
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
A txout script template with a specific destination.