mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
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.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user