From 63c17cf2c10ffee9c81b792ae8fb46de57e8747d Mon Sep 17 00:00:00 2001 From: jsteube Date: Mon, 5 Sep 2016 12:34:36 +0200 Subject: [PATCH] replaced macros with enums and static const char types based on https://github.com/hashcat/hashcat/pull/485/commits/a55052cc66029a3a5ef76ae4bc1a216f812464f2 --- include/shared.h | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/include/shared.h b/include/shared.h index 1ad475889..e9066195a 100644 --- a/include/shared.h +++ b/include/shared.h @@ -1278,17 +1278,21 @@ typedef enum opts_type * digests */ -#define DGST_SIZE_4_2 (2 * sizeof (uint)) // 8 -#define DGST_SIZE_4_4 (4 * sizeof (uint)) // 16 -#define DGST_SIZE_4_5 (5 * sizeof (uint)) // 20 -#define DGST_SIZE_4_6 (6 * sizeof (uint)) // 24 -#define DGST_SIZE_4_8 (8 * sizeof (uint)) // 32 -#define DGST_SIZE_4_16 (16 * sizeof (uint)) // 64 !!! -#define DGST_SIZE_4_32 (32 * sizeof (uint)) // 128 !!! -#define DGST_SIZE_4_64 (64 * sizeof (uint)) // 256 -#define DGST_SIZE_8_8 (8 * sizeof (u64)) // 64 !!! -#define DGST_SIZE_8_16 (16 * sizeof (u64)) // 128 !!! -#define DGST_SIZE_8_25 (25 * sizeof (u64)) // 200 +typedef enum dgst_size +{ + DGST_SIZE_4_2 = (2 * sizeof (uint)), // 8 + DGST_SIZE_4_4 = (4 * sizeof (uint)), // 16 + DGST_SIZE_4_5 = (5 * sizeof (uint)), // 20 + DGST_SIZE_4_6 = (6 * sizeof (uint)), // 24 + DGST_SIZE_4_8 = (8 * sizeof (uint)), // 32 + DGST_SIZE_4_16 = (16 * sizeof (uint)), // 64 !!! + DGST_SIZE_4_32 = (32 * sizeof (uint)), // 128 !!! + DGST_SIZE_4_64 = (64 * sizeof (uint)), // 256 + DGST_SIZE_8_8 = (8 * sizeof (u64)), // 64 !!! + DGST_SIZE_8_16 = (16 * sizeof (u64)), // 128 !!! + DGST_SIZE_8_25 = (25 * sizeof (u64)) // 200 + +} dgst_size_t; /** * parser