Bitcoin Core 22.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
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
std::string EncodeBase58(Span< const unsigned char > input)
Why base-58 instead of standard base-64 encoding?
Definition: base58.cpp:87
std::string EncodeBase58Check(Span< const unsigned char > input)
Encode a byte span into a base58-encoded string, including checksum.
Definition: base58.cpp:135
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
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
A Span is an object that can refer to a contiguous sequence of objects.
Definition: span.h:93