aboutsummaryrefslogtreecommitdiff
path: root/src/util/strencodings.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2022-04-04 13:19:49 -0400
committerMacroFake <falke.marco@gmail.com>2022-04-27 14:12:55 +0200
commita65931e3ce66d87b8f83d67ecdbb46f137e6a670 (patch)
tree1cdbaa2a15af7b87d7a963c4c759c2a29ddbe437 /src/util/strencodings.h
parenta4377a0843636eae0aaf698510fc6518582545db (diff)
downloadbitcoin-a65931e3ce66d87b8f83d67ecdbb46f137e6a670.tar.xz
Make DecodeBase{32,64} always return vector, not string
Base32/base64 are mechanisms for encoding binary data. That they'd decode to a string is just bizarre. The fact that they'd do that based on the type of input arguments even more so.
Diffstat (limited to 'src/util/strencodings.h')
-rw-r--r--src/util/strencodings.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/strencodings.h b/src/util/strencodings.h
index c87b2d2415..5d85f0580b 100644
--- a/src/util/strencodings.h
+++ b/src/util/strencodings.h
@@ -65,12 +65,12 @@ bool IsHex(std::string_view str);
*/
bool IsHexNumber(std::string_view str);
std::vector<unsigned char> DecodeBase64(const char* p, bool* pf_invalid);
-std::string DecodeBase64(const std::string& str, bool* pf_invalid);
+std::vector<unsigned char> DecodeBase64(const std::string& str, bool* pf_invalid);
std::string EncodeBase64(Span<const unsigned char> input);
inline std::string EncodeBase64(Span<const std::byte> input) { return EncodeBase64(MakeUCharSpan(input)); }
inline std::string EncodeBase64(const std::string& str) { return EncodeBase64(MakeUCharSpan(str)); }
std::vector<unsigned char> DecodeBase32(const char* p, bool* pf_invalid);
-std::string DecodeBase32(const std::string& str, bool* pf_invalid);
+std::vector<unsigned char> DecodeBase32(const std::string& str, bool* pf_invalid);
/**
* Base32 encode.