aboutsummaryrefslogtreecommitdiff
path: root/src/util/strings.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-11-05 20:50:28 +0000
committerChristian Grothoff <christian@grothoff.org>2013-11-05 20:50:28 +0000
commitd6dc95fdf0a795338f6dacb0d8141e3970924dc9 (patch)
tree89afea6f4ecac70ff2bfd46c8e5e0acd7eb0a08f /src/util/strings.c
parent41194a0e54f842538b7f917662f92de6877f1487 (diff)
downloadgnunet-d6dc95fdf0a795338f6dacb0d8141e3970924dc9.tar.gz
gnunet-d6dc95fdf0a795338f6dacb0d8141e3970924dc9.zip
-tolerate lower case letters
Diffstat (limited to 'src/util/strings.c')
-rw-r--r--src/util/strings.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/util/strings.c b/src/util/strings.c
index d5c752fe1..b25b39bcd 100644
--- a/src/util/strings.c
+++ b/src/util/strings.c
@@ -778,6 +778,8 @@ getValue__ (unsigned char a)
778 return a - '0'; 778 return a - '0';
779 if ((a >= 'A') && (a <= 'V')) 779 if ((a >= 'A') && (a <= 'V'))
780 return (a - 'A' + 10); 780 return (a - 'A' + 10);
781 if ((a >= 'a') && (a <= 'v'))
782 return (a - 'a' + 10);
781 return -1; 783 return -1;
782} 784}
783 785
@@ -855,10 +857,10 @@ GNUNET_STRINGS_data_to_string (const void *data, size_t size, char *out, size_t
855 * out_size must match exactly the size of the data before it was encoded. 857 * out_size must match exactly the size of the data before it was encoded.
856 * 858 *
857 * @param enc the encoding 859 * @param enc the encoding
858 * @param enclen number of characters in 'enc' (without 0-terminator, which can be missing) 860 * @param enclen number of characters in @a enc (without 0-terminator, which can be missing)
859 * @param out location where to store the decoded data 861 * @param out location where to store the decoded data
860 * @param out_size size of the output buffer 862 * @param out_size size of the output buffer @a out
861 * @return GNUNET_OK on success, GNUNET_SYSERR if result has the wrong encoding 863 * @return #GNUNET_OK on success, #GNUNET_SYSERR if result has the wrong encoding
862 */ 864 */
863int 865int
864GNUNET_STRINGS_string_to_data (const char *enc, size_t enclen, 866GNUNET_STRINGS_string_to_data (const char *enc, size_t enclen,