diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2020-08-10 03:03:10 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2020-08-12 16:25:50 +0200 |
commit | 356988e200b1debaa80d210d502d2d085c72dc64 (patch) | |
tree | 1d44ec1ddd069ffeb785acb30c438a6a08ea2a0e /src/base58.cpp | |
parent | f0fce0675d56b2226a993253731690ca864066c8 (diff) |
util: make EncodeBase58Check consume Spans
Diffstat (limited to 'src/base58.cpp')
-rw-r--r-- | src/base58.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/base58.cpp b/src/base58.cpp index 715e4e7891..18cd2090e0 100644 --- a/src/base58.cpp +++ b/src/base58.cpp @@ -132,10 +132,10 @@ bool DecodeBase58(const std::string& str, std::vector<unsigned char>& vchRet, in return DecodeBase58(str.c_str(), vchRet, max_ret_len); } -std::string EncodeBase58Check(const std::vector<unsigned char>& vchIn) +std::string EncodeBase58Check(Span<const unsigned char> input) { // add 4-byte hash check to the end - std::vector<unsigned char> vch(vchIn); + std::vector<unsigned char> vch(input.begin(), input.end()); uint256 hash = Hash(vch); vch.insert(vch.end(), (unsigned char*)&hash, (unsigned char*)&hash + 4); return EncodeBase58(vch); |