aboutsummaryrefslogtreecommitdiff
path: root/src/util/strencodings.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/strencodings.h')
-rw-r--r--src/util/strencodings.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/util/strencodings.h b/src/util/strencodings.h
index 1519214140..1a217dd12d 100644
--- a/src/util/strencodings.h
+++ b/src/util/strencodings.h
@@ -52,8 +52,20 @@ std::string EncodeBase64(Span<const unsigned char> input);
std::string EncodeBase64(const std::string& str);
std::vector<unsigned char> DecodeBase32(const char* p, bool* pf_invalid = nullptr);
std::string DecodeBase32(const std::string& str, bool* pf_invalid = nullptr);
-std::string EncodeBase32(Span<const unsigned char> input);
-std::string EncodeBase32(const std::string& str);
+
+/**
+ * Base32 encode.
+ * If `pad` is true, then the output will be padded with '=' so that its length
+ * is a multiple of 8.
+ */
+std::string EncodeBase32(Span<const unsigned char> input, bool pad = true);
+
+/**
+ * Base32 encode.
+ * If `pad` is true, then the output will be padded with '=' so that its length
+ * is a multiple of 8.
+ */
+std::string EncodeBase32(const std::string& str, bool pad = true);
void SplitHostPort(std::string in, int& portOut, std::string& hostOut);
int64_t atoi64(const std::string& str);