diff options
Diffstat (limited to 'src/include/gnunet_dnsparser_lib.h')
-rw-r--r-- | src/include/gnunet_dnsparser_lib.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/include/gnunet_dnsparser_lib.h b/src/include/gnunet_dnsparser_lib.h index fc4b7444e..2684a794b 100644 --- a/src/include/gnunet_dnsparser_lib.h +++ b/src/include/gnunet_dnsparser_lib.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet | 2 | This file is part of GNUnet |
3 | (C) 2010-2013 Christian Grothoff (and other contributing authors) | 3 | (C) 2010-2014 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -859,4 +859,29 @@ void | |||
859 | GNUNET_DNSPARSER_free_cert (struct GNUNET_DNSPARSER_CertRecord *cert); | 859 | GNUNET_DNSPARSER_free_cert (struct GNUNET_DNSPARSER_CertRecord *cert); |
860 | 860 | ||
861 | 861 | ||
862 | /** | ||
863 | * Convert a block of binary data to HEX. | ||
864 | * | ||
865 | * @param data binary data to convert | ||
866 | * @param data_size number of bytes in @a data | ||
867 | * @return HEX string (lower case) | ||
868 | */ | ||
869 | char * | ||
870 | GNUNET_DNSPARSER_bin_to_hex (const void *data, | ||
871 | size_t data_size); | ||
872 | |||
873 | |||
874 | /** | ||
875 | * Convert a HEX string to block of binary data. | ||
876 | * | ||
877 | * @param hex HEX string to convert (may contain mixed case) | ||
878 | * @param data where to write result, must be | ||
879 | * at least `strlen(hex)/2` bytes long | ||
880 | * @return number of bytes written to data | ||
881 | */ | ||
882 | size_t | ||
883 | GNUNET_DNSPARSER_hex_to_bin (const char *hex, | ||
884 | void *data); | ||
885 | |||
886 | |||
862 | #endif | 887 | #endif |