util: make EncodeBase58 consume Spans

This commit is contained in:
Sebastian Falbesoner
2020-08-10 02:52:37 +02:00
parent bd00d3b1f2
commit f0fce0675d
5 changed files with 13 additions and 23 deletions

View File

@@ -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).