PIVX Core  5.6.99
P2P Digital Currency
base58.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2014 The Bitcoin developers
3 // Copyright (c) 2017-2021 The PIVX Core developers
4 // Distributed under the MIT software license, see the accompanying
5 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
6 
15 #ifndef PIVX_BASE58_H
16 #define PIVX_BASE58_H
17 
18 #include "attributes.h"
19 #include "chainparams.h"
20 #include "key.h"
21 #include "pubkey.h"
22 #include "script/standard.h"
23 
24 #include <string>
25 #include <vector>
26 
31 std::string EncodeBase58(const unsigned char* pbegin, const unsigned char* pend);
32 
36 std::string EncodeBase58(const std::vector<unsigned char>& vch);
37 
43 NODISCARD bool DecodeBase58(const char* psz, std::vector<unsigned char>& vchRet, int max_ret_len);
44 
49 NODISCARD bool DecodeBase58(const std::string& str, std::vector<unsigned char>& vchRet, int max_ret_len);
50 
54 std::string EncodeBase58Check(const std::vector<unsigned char>& vchIn);
55 
60 NODISCARD bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRet, int max_ret_len);
61 
66 NODISCARD bool DecodeBase58Check(const std::string& str, std::vector<unsigned char>& vchRet, int max_ret_len);
67 
68 #endif // PIVX_BASE58_H
#define NODISCARD
Definition: attributes.h:18
NODISCARD bool DecodeBase58(const char *psz, std::vector< unsigned char > &vchRet, int max_ret_len)
Decode a base58-encoded string (psz) into a byte vector (vchRet).
Definition: base58.cpp:23
NODISCARD bool DecodeBase58Check(const char *psz, std::vector< unsigned char > &vchRet, int max_ret_len)
Decode a base58-encoded string (psz) that includes a checksum into a byte vector (vchRet),...
Definition: base58.cpp:135
std::string EncodeBase58(const unsigned char *pbegin, const unsigned char *pend)
Why base-58 instead of standard base-64 encoding?
Definition: base58.cpp:73
std::string EncodeBase58Check(const std::vector< unsigned char > &vchIn)
Encode a byte vector into a base58-encoded string, including checksum.
Definition: base58.cpp:126