diff options
author | Jameson Graef Rollins <jrollins@phys.columbia.edu> | 2008-06-23 19:33:54 -0400 |
---|---|---|
committer | Jameson Graef Rollins <jrollins@phys.columbia.edu> | 2008-06-23 19:33:54 -0400 |
commit | 91bf57bac7bed32937c13595044158007e7b5812 (patch) | |
tree | 4e6aaac09c2f1c0a581d3c541b13840b494d6355 /src/keytrans/gnutls-helpers.h | |
parent | 70cf71b1d716e2ec16fae03cd89da3f088f5f4c4 (diff) | |
parent | abedea11eca1cf2294196cb6cd39d40f4877f7d4 (diff) |
Merge commit 'dkg/master'
Diffstat (limited to 'src/keytrans/gnutls-helpers.h')
-rw-r--r-- | src/keytrans/gnutls-helpers.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/keytrans/gnutls-helpers.h b/src/keytrans/gnutls-helpers.h index f196456..bf54af0 100644 --- a/src/keytrans/gnutls-helpers.h +++ b/src/keytrans/gnutls-helpers.h @@ -49,7 +49,18 @@ int convert_string_to_keyid(gnutls_openpgp_keyid_t out, const char* str); int convert_string_to_printable_keyid(printable_keyid out, const char* str); /* you must have twice as many bytes in the out buffer as in the in buffer */ -void hex_print_data(char* out, const char* in, size_t incount); +void hex_print_data(char* out, const unsigned char* in, size_t incount); + +/* expects a null-terminated string as in, containing an even number + of hexadecimal characters. + + returns length in *bits* of raw data as output. + + the out buffer must be at least half as long as in to hold the + output. if out is NULL, no output will be generated, but the + length will still be returned. +*/ +unsigned int hexstring2bin(unsigned char* out, const char* in); /* functions to get data into datum objects: */ |