From 61765136cf92be2884603bc3fac020a1c6ed91f4 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 1 Oct 2019 10:32:31 +0200 Subject: common: New function hex2fixedbuf. * common/convert.c (hex2fixedbuf): New. -- This function is useful for converting hex strings received via assuan if they have a known length. For example keygrips or the new UBID. Signed-off-by: Werner Koch --- common/util.h | 1 + 1 file changed, 1 insertion(+) (limited to 'common/util.h') diff --git a/common/util.h b/common/util.h index 8f8a06a41..6c878083a 100644 --- a/common/util.h +++ b/common/util.h @@ -206,6 +206,7 @@ char *bin2hexcolon (const void *buffer, size_t length, char *stringbuf); const char *hex2str (const char *hexstring, char *buffer, size_t bufsize, size_t *buflen); char *hex2str_alloc (const char *hexstring, size_t *r_count); +unsigned int hex2fixedbuf (const char *hexstr, void *buffer, size_t bufsize); /*-- percent.c --*/ char *percent_plus_escape (const char *string); -- cgit v1.2.3