summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/base16.h
diff options
context:
space:
mode:
authorMichael Brown2013-07-12 14:44:20 +0200
committerMichael Brown2013-07-12 15:14:36 +0200
commit076f58c4bf9fa1ae0faa65a731523cb531705974 (patch)
treeabe42a7625ab2fc15a572e4e6959310a2b0c9ce3 /src/include/ipxe/base16.h
parent[test] Add self-tests for base16 (diff)
downloadipxe-076f58c4bf9fa1ae0faa65a731523cb531705974.tar.gz
ipxe-076f58c4bf9fa1ae0faa65a731523cb531705974.tar.xz
ipxe-076f58c4bf9fa1ae0faa65a731523cb531705974.zip
[base16] Generalise base16_decode() to hex_decode()
Provide a generic hex_decode() routine which can be shared between the Base16 code and the "hex" and "hexhyp" settings parsers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/base16.h')
-rw-r--r--src/include/ipxe/base16.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/ipxe/base16.h b/src/include/ipxe/base16.h
index f0c9842f..60e3f231 100644
--- a/src/include/ipxe/base16.h
+++ b/src/include/ipxe/base16.h
@@ -33,6 +33,8 @@ static inline size_t base16_decoded_max_len ( const char *encoded ) {
}
extern void base16_encode ( const uint8_t *raw, size_t len, char *encoded );
+extern int hex_decode ( const char *string, char separator, void *data,
+ size_t len );
extern int base16_decode ( const char *encoded, uint8_t *raw );
#endif /* _IPXE_BASE16_H */