Bitcoin Core 28.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-2022 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 <span.h>
18
19#include <string>
20#include <vector>
21
26
31[[nodiscard]] bool DecodeBase58(const std::string& str, std::vector<unsigned char>& vchRet, int max_ret_len);
32
37
42[[nodiscard]] bool DecodeBase58Check(const std::string& str, std::vector<unsigned char>& vchRet, int max_ret_len);
43
44#endif // BITCOIN_BASE58_H
std::string EncodeBase58(Span< const unsigned char > input)
Why base-58 instead of standard base-64 encoding?
Definition: base58.cpp:89
std::string EncodeBase58Check(Span< const unsigned char > input)
Encode a byte span into a base58-encoded string, including checksum.
Definition: base58.cpp:137
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:129
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:163