aboutsummaryrefslogtreecommitdiff
path: root/src/base58.h
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2020-08-10 02:52:37 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2020-08-12 16:25:50 +0200
commitf0fce0675d56b2226a993253731690ca864066c8 (patch)
tree25b8fb258913edec576cad0740f014f8fa643bef /src/base58.h
parentbd00d3b1f2036893419d1e8c514a8af2c4e4b1fb (diff)
downloadbitcoin-f0fce0675d56b2226a993253731690ca864066c8.tar.xz
util: make EncodeBase58 consume Spans
Diffstat (limited to 'src/base58.h')
-rw-r--r--src/base58.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/base58.h b/src/base58.h
index 042ad671d3..d9791d1dbe 100644
--- a/src/base58.h
+++ b/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).