15 #ifndef RAVEN_BASE58_H 16 #define RAVEN_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);
105 bool Set(
const CKeyID &
id);
108 bool IsValid()
const;
117 bool GetIndexKey(
uint160& hashBytes,
int& type)
const;
126 void SetKey(
const CKey& vchSecret);
128 bool IsValid()
const;
130 bool SetString(
const std::string& strSecret);
140 unsigned char vch[Size];
173 #endif // RAVEN_BASE58_H void SetKey(const K &key)
bool IsValidDestinationString(const std::string &str)
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).
int CompareTo(const CBase58Data &b58) const
CChainParams defines various tweakable parameters of a given instance of the Raven 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)
std::string ToString() const
CRavenExtKeyBase(const std::string &strBase58c)
std::vector< unsigned char, zero_after_free_allocator< unsigned char > > vector_uchar
the actually encoded data
Base class for all base58-encoded data.
bool operator<=(const CBase58Data &b58) const
bool operator==(const CBase58Data &b58) const
base58-encoded Raven addresses.
bool operator>=(const CBase58Data &b58) const
CRavenExtKeyBase(const K &key)
CRavenSecret(const CKey &vchSecret)
bool SetString(const char *psz, unsigned int nVersionBytes=1)
CRavenAddress(const CTxDestination &dest)
std::string EncodeBase58Check(const std::vector< unsigned char > &vchIn)
Encode a byte vector into a base58-encoded string, including checksum.
CRavenExtKeyBase< CExtKey, BIP32_EXTKEY_SIZE, CChainParams::EXT_SECRET_KEY > CRavenExtKey
std::string EncodeDestination(const CTxDestination &dest)
CRavenAddress(const std::string &strAddress)
CRavenExtKeyBase< CExtPubKey, BIP32_EXTKEY_SIZE, CChainParams::EXT_PUBLIC_KEY > CRavenExtPubKey
const CChainParams & Params()
Return the currently selected parameters.
A base58-encoded secret key.
CTxDestination DecodeDestination(const std::string &str)
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?
bool operator>(const CBase58Data &b58) const
A reference to a CScript: the Hash160 of its serialization (see script.h)
An encapsulated private key.
bool operator<(const CBase58Data &b58) const
std::vector< unsigned char > vchVersion
the version byte(s)
CRavenAddress(const char *pszAddress)
const std::vector< unsigned char > & Base58Prefix(Base58Type type) const