]> git.ipfire.org Git - thirdparty/bind9.git/commit
expose hex_decode APIs
authorColin Vidal <colin@isc.org>
Fri, 16 May 2025 16:33:13 +0000 (18:33 +0200)
committerColin Vidal <colin@isc.org>
Wed, 1 Oct 2025 10:16:05 +0000 (12:16 +0200)
commite34dd2b73ef17c3ca57adee1d5f73a85f3e5fb10
tree9723311024fecff7e57ee5d89b23fbdb393f3365
parentac4cf4cce8d616060d093fb3575e0c136ddcbd1a
expose hex_decode APIs

Functions hex_decode_init(), hex_decode_char() and hex_decode_finish()
are now exposed, as well as the context hex_decode_ctx_t. They now are
respectively called isc_hex_decodeinit(), isc_hex_decodechar(),
isc_hex_decodefinish() and isc_hex_decodectx_t.

This enable to re-implement the functionality of isc_hex_decodestring()
in contextes where the input is not a NULL-terminated string, but, for
example, individual characters extracted (and avoid creating an
intermediate buffer to store them). This also enable to decode a stream
of hex characters where only hex characters are expected (i.e. no white
spaces).
lib/isc/hex.c
lib/isc/include/isc/hex.h