From ca84af553cbaae45b17cce04d457b2e61cc4277c Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Mon, 23 Oct 2017 18:05:31 -0400 Subject: Cleanup signed/unsigned mismatches, mostly in loop counters --- pbkdf2.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'pbkdf2.c') diff --git a/pbkdf2.c b/pbkdf2.c index 690831f..0a1e57e 100644 --- a/pbkdf2.c +++ b/pbkdf2.c @@ -90,7 +90,6 @@ hal_error_t hal_pbkdf2(hal_core_t *core, unsigned iteration; hal_error_t err; uint32_t block; - int i; if (descriptor == NULL || password == NULL || salt == NULL || derived_key == NULL || derived_key_length == 0 || @@ -108,13 +107,6 @@ hal_error_t hal_pbkdf2(hal_core_t *core, memset(result, 0, sizeof(result)); memset(mac, 0, sizeof(mac)); -#if 1 - /* HACK - find the second sha256 core, to avoid interfering with rpc. - */ - core = hal_core_find(descriptor->core_name, NULL); - core = hal_core_find(descriptor->core_name, core); -#endif - /* * We probably should check here to see whether the password is * longer than the HMAC block size, and, if so, we should hash the @@ -153,7 +145,7 @@ hal_error_t hal_pbkdf2(hal_core_t *core, 0, mac, sizeof(mac))) != HAL_OK) return err; - for (i = 0; i < descriptor->digest_length; i++) + for (size_t i = 0; i < descriptor->digest_length; i++) result[i] ^= mac[i]; } -- cgit v1.2.3