mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Make DecodeBase{32,64} take string_view arguments
This commit is contained in:
@@ -64,13 +64,11 @@ bool IsHex(std::string_view str);
|
||||
* Return true if the string is a hex number, optionally prefixed with "0x"
|
||||
*/
|
||||
bool IsHexNumber(std::string_view str);
|
||||
std::optional<std::vector<unsigned char>> DecodeBase64(const char* p);
|
||||
std::optional<std::vector<unsigned char>> DecodeBase64(const std::string& str);
|
||||
std::optional<std::vector<unsigned char>> DecodeBase64(std::string_view str);
|
||||
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::optional<std::vector<unsigned char>> DecodeBase32(const char* p);
|
||||
std::optional<std::vector<unsigned char>> DecodeBase32(const std::string& str);
|
||||
std::optional<std::vector<unsigned char>> DecodeBase32(std::string_view str);
|
||||
|
||||
/**
|
||||
* Base32 encode.
|
||||
|
||||
Reference in New Issue
Block a user