Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
base58.h
Go to the documentation of this file.
1// Copyright (c) 2009-2010 Satoshi Nakamoto
2// Copyright (c) 2009-2015 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
16#ifndef BITCOIN_BASE58_H
17#define BITCOIN_BASE58_H
18
19#include <span.h>
20
21#include <string>
22#include <vector>
23
27std::string EncodeBase58(Span<const uint8_t> input);
28
33[[nodiscard]] bool DecodeBase58(const std::string &str,
34 std::vector<uint8_t> &vchRet, int max_ret_len);
35
39std::string EncodeBase58Check(Span<const uint8_t> input);
40
45[[nodiscard]] bool DecodeBase58Check(const std::string &str,
46 std::vector<uint8_t> &vchRet,
47 int max_ret_len);
48
49#endif // BITCOIN_BASE58_H
std::string EncodeBase58(Span< const uint8_t > input)
Why base-58 instead of standard base-64 encoding?
Definition base58.cpp:101
std::string EncodeBase58Check(Span< const uint8_t > input)
Encode a byte span into a base58-encoded string, including checksum.
Definition base58.cpp:152
bool DecodeBase58Check(const std::string &str, std::vector< uint8_t > &vchRet, int max_ret_len)
Decode a base58-encoded string (str) that includes a checksum into a byte vector (vchRet),...
Definition base58.cpp:181
bool DecodeBase58(const std::string &str, std::vector< uint8_t > &vchRet, int max_ret_len)
Decode a base58-encoded string (str) into a byte vector (vchRet).
Definition base58.cpp:144
A Span is an object that can refer to a contiguous sequence of objects.
Definition span.h:93
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85