summaryrefslogtreecommitdiffstats
path: root/util/cbfstool/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbfstool/common.h')
-rw-r--r--util/cbfstool/common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h
index 8073d12222ca..86ae484544d4 100644
--- a/util/cbfstool/common.h
+++ b/util/cbfstool/common.h
@@ -210,4 +210,11 @@ extern struct xdr xdr_le, xdr_be;
size_t bgets(struct buffer *input, void *output, size_t len);
size_t bputs(struct buffer *b, const void *data, size_t len);
+/* Returns a 0-terminated string containing a hex representation of
+ * len bytes starting at data.
+ * The string is malloc'd and it's the caller's responsibility to free
+ * the memory.
+ * On error, bintohex returns NULL.
+ */
+char *bintohex(uint8_t *data, size_t len);
#endif