aboutsummaryrefslogtreecommitdiffstats
path: root/common/util.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-10-01 08:32:31 +0000
committerWerner Koch <[email protected]>2019-10-01 08:32:31 +0000
commit61765136cf92be2884603bc3fac020a1c6ed91f4 (patch)
tree2767becfb20c72a87ad5b2a5b811226b4dc4b8ac /common/util.h
parentgpg: Fix --recv-key in case of a given fingerprint. (diff)
downloadgnupg-61765136cf92be2884603bc3fac020a1c6ed91f4.tar.gz
gnupg-61765136cf92be2884603bc3fac020a1c6ed91f4.zip
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 <[email protected]>
Diffstat (limited to 'common/util.h')
-rw-r--r--common/util.h1
1 files changed, 1 insertions, 0 deletions
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);