summaryrefslogtreecommitdiff
path: root/src/common/strlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/strlib.h')
-rw-r--r--src/common/strlib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/strlib.h b/src/common/strlib.h
index 074c7eae3..1ba26ca4c 100644
--- a/src/common/strlib.h
+++ b/src/common/strlib.h
@@ -46,6 +46,10 @@ int safesnprintf(char* buf, size_t sz, const char* fmt, ...);
/// Lines start at 1.
int strline(const char* str, size_t pos);
+/// Produces the hexadecimal representation of the given input.
+/// The output buffer must be at least count*2+1 in size.
+/// Returns true on success, false on failure.
+bool bin2hex(char* output, unsigned char* input, size_t count);
/// Bitfield determining the behaviour of sv_parse and sv_split.