diff options
author | Pieter Wuille <pieter@wuille.net> | 2022-04-04 14:10:10 -0400 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-04-27 14:12:55 +0200 |
commit | 8ffbd1412d887535ce5eb613884858c319bd12be (patch) | |
tree | b5389e1e788d87fc12edcd7dfe94fbad3b87647e /src/util/strencodings.h | |
parent | 1a72d62152bfdd7c5c2b2704b679f894e7d35e37 (diff) | |
download | bitcoin-8ffbd1412d887535ce5eb613884858c319bd12be.tar.xz |
Make DecodeBase{32,64} take string_view arguments
Diffstat (limited to 'src/util/strencodings.h')
-rw-r--r-- | src/util/strencodings.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/util/strencodings.h b/src/util/strencodings.h index 8a277bac4a..ba8132b08d 100644 --- a/src/util/strencodings.h +++ b/src/util/strencodings.h @@ -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. |