From 1809794299602f72446214646cb45c6bb3d60e6c Mon Sep 17 00:00:00 2001 From: unix-ninja Date: Mon, 22 Oct 2018 08:02:57 -0400 Subject: [PATCH] Simplify code in check_hash() --- src/hashes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hashes.c b/src/hashes.c index b451c4b23..3f7b9d5e5 100644 --- a/src/hashes.c +++ b/src/hashes.c @@ -284,8 +284,7 @@ void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl u8 *temp_ptr = (u8 *) temp_buf; // encode our plain - base32_encode (int_to_base32, (const u8 *) plain_ptr, plain_len, (u8 *) temp_buf); - plain_len = strlen ((const char *) temp_buf); + plain_len = base32_encode (int_to_base32, (const u8 *) plain_ptr, plain_len, (u8 *) temp_buf); // copy the base32 content into our plain buffer strncpy ((char *) plain_ptr, (char *) temp_ptr, sizeof (plain_buf));