1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-05-05 08:29:17 +00:00

LUKS legacy module code cleanup

This commit is contained in:
Konrad Goławski 2022-07-05 05:49:31 +02:00
parent e30be9f17c
commit 74e2dad0d7

View File

@ -155,14 +155,14 @@ typedef enum hc_luks_cipher_mode
typedef struct luks typedef struct luks
{ {
int hash_type; // hc_luks_hash_type_t int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t int cipher_mode; // hc_luks_cipher_mode_t
u32 ct_buf[128]; u32 ct_buf[128];
u32 af_buf[((HC_LUKS_KEY_SIZE_512 / 8) * LUKS_STRIPES) / 4]; u32 af_buf[HC_LUKS_KEY_SIZE_512 / 8 * LUKS_STRIPES / 4];
u32 af_len; u32 af_len;
} luks_t; } luks_t;
@ -187,9 +187,9 @@ void *module_benchmark_esalt (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
{ {
luks_t *luks = (luks_t *) hcmalloc (sizeof (luks_t)); luks_t *luks = (luks_t *) hcmalloc (sizeof (luks_t));
luks->key_size = HC_LUKS_KEY_SIZE_256; luks->key_size = HC_LUKS_KEY_SIZE_256;
luks->cipher_type = HC_LUKS_CIPHER_TYPE_AES; luks->cipher_type = HC_LUKS_CIPHER_TYPE_AES;
luks->cipher_mode = HC_LUKS_CIPHER_MODE_XTS_PLAIN; luks->cipher_mode = HC_LUKS_CIPHER_MODE_XTS_PLAIN;
return luks; return luks;
} }
@ -554,7 +554,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
if (rc_seek1 == -1) if (rc_seek1 == -1)
{ {
hc_fclose (&fp); hc_fclose (&fp);
return (PARSER_LUKS_FILE_SIZE); return (PARSER_LUKS_FILE_SIZE);
} }