From 248fc3245a98731cf6fbb1bf460cd4e2e2d56de8 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 26 Jun 2013 12:16:12 +0000 Subject: -moving REGEX_INTERNAL_check_proof to libgnunetregexblock, integrating proof check into block plugin --- src/regex/regex_internal.c | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'src/regex/regex_internal.c') diff --git a/src/regex/regex_internal.c b/src/regex/regex_internal.c index 059aaaed6..4ad27c441 100644 --- a/src/regex/regex_internal.c +++ b/src/regex/regex_internal.c @@ -3328,31 +3328,6 @@ REGEX_INTERNAL_get_first_key (const char *input_string, size_t string_len, } -/** - * Check if the given 'proof' matches the given 'key'. - * - * @param proof partial regex of a state. - * @param key hash of a state. - * - * @return GNUNET_OK if the proof is valid for the given key. - */ -int -REGEX_INTERNAL_check_proof (const char *proof, const struct GNUNET_HashCode *key) -{ - struct GNUNET_HashCode key_check; - - if (NULL == proof || NULL == key) - { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Proof check failed, was NULL.\n"); - return GNUNET_NO; - } - - GNUNET_CRYPTO_hash (proof, strlen (proof), &key_check); - return (0 == - GNUNET_CRYPTO_hash_cmp (key, &key_check)) ? GNUNET_OK : GNUNET_NO; -} - - /** * Recursive function that calls the iterator for each synthetic start state. * -- cgit v1.2.3