aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/mhd_str.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/mhd_str.h')
-rw-r--r--src/microhttpd/mhd_str.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/microhttpd/mhd_str.h b/src/microhttpd/mhd_str.h
index ec8b5cf4..91219cba 100644
--- a/src/microhttpd/mhd_str.h
+++ b/src/microhttpd/mhd_str.h
@@ -494,6 +494,24 @@ MHD_bin_to_hex (const void *bin,
494 char *hex); 494 char *hex);
495 495
496/** 496/**
497 * Convert hexadecimal digits to binary data.
498 *
499 * The input decoded byte-by-byte (each byte is two hexadecimal digits).
500 * If length is an odd number, extra leading zero is assumed.
501 *
502 * @param hex the input string with hexadecimal digits
503 * @param len the length of the input string
504 * @param[out] bin the output buffer, must be at least len/2 bytes long (or
505 * len/2 + 1 if @a len is not even number)
506 * @return the number of bytes written to the output buffer,
507 * zero if found any character which is not hexadecimal digits
508 */
509size_t
510MHD_hex_to_bin (const char *hex,
511 size_t len,
512 void *bin);
513
514/**
497 * Decode string with percent-encoded characters as defined by 515 * Decode string with percent-encoded characters as defined by
498 * RFC 3986 #section-2.1. 516 * RFC 3986 #section-2.1.
499 * 517 *