mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
util: make EncodeBase58 consume Spans
This commit is contained in:
11
src/base58.h
11
src/base58.h
@@ -15,20 +15,15 @@
|
||||
#define BITCOIN_BASE58_H
|
||||
|
||||
#include <attributes.h>
|
||||
#include <span.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
* Encode a byte sequence as a base58-encoded string.
|
||||
* pbegin and pend cannot be nullptr, unless both are.
|
||||
* Encode a byte span as a base58-encoded string
|
||||
*/
|
||||
std::string EncodeBase58(const unsigned char* pbegin, const unsigned char* pend);
|
||||
|
||||
/**
|
||||
* Encode a byte vector as a base58-encoded string
|
||||
*/
|
||||
std::string EncodeBase58(const std::vector<unsigned char>& vch);
|
||||
std::string EncodeBase58(Span<const unsigned char> input);
|
||||
|
||||
/**
|
||||
* Decode a base58-encoded string (psz) into a byte vector (vchRet).
|
||||
|
||||
Reference in New Issue
Block a user