diff options
author | Paul Selkirk <paul@psgd.org> | 2017-10-23 18:05:31 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2017-10-23 18:05:31 -0400 |
commit | ca84af553cbaae45b17cce04d457b2e61cc4277c (patch) | |
tree | 90f2bc5e96d2f1ae3fece3dfb9075edda08c4ace /pbkdf2.c | |
parent | 12a3c63b75044b207dd7982ce3ed170231bd4467 (diff) |
Cleanup signed/unsigned mismatches, mostly in loop counters
Diffstat (limited to 'pbkdf2.c')
-rw-r--r-- | pbkdf2.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -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]; } |