Bitcoin Core  21.99.0
P2P Digital Currency
base58.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2020 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
14 #ifndef BITCOIN_BASE58_H
15 #define BITCOIN_BASE58_H
16 
17 #include <attributes.h>
18 #include <span.h>
19 
20 #include <string>
21 #include <vector>
22 
26 std::string EncodeBase58(Span<const unsigned char> input);
27 
32 [[nodiscard]] bool DecodeBase58(const std::string& str, std::vector<unsigned char>& vchRet, int max_ret_len);
33 
38 
43 [[nodiscard]] bool DecodeBase58Check(const std::string& str, std::vector<unsigned char>& vchRet, int max_ret_len);
44 
45 #endif // BITCOIN_BASE58_H
EncodeBase58
std::string EncodeBase58(Span< const unsigned char > input)
Why base-58 instead of standard base-64 encoding?
Definition: base58.cpp:87
EncodeBase58Check
std::string EncodeBase58Check(Span< const unsigned char > input)
Encode a byte span into a base58-encoded string, including checksum.
Definition: base58.cpp:135
DecodeBase58Check
bool DecodeBase58Check(const std::string &str, std::vector< unsigned char > &vchRet, int max_ret_len)
Decode a base58-encoded string (str) that includes a checksum into a byte vector (vchRet),...
Definition: base58.cpp:161
Span
A Span is an object that can refer to a contiguous sequence of objects.
Definition: span.h:92
DecodeBase58
bool DecodeBase58(const std::string &str, std::vector< unsigned char > &vchRet, int max_ret_len)
Decode a base58-encoded string (str) into a byte vector (vchRet).
Definition: base58.cpp:127
span.h
attributes.h