mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-22 08:08:10 +00:00
fix whitespace/indentation
This commit is contained in:
parent
6716447dfc
commit
fcfbc328d3
File diff suppressed because it is too large
Load Diff
@ -4,23 +4,23 @@
|
||||
#define _OPENCL_CAST_H
|
||||
|
||||
// #include "opencl_misc.h"
|
||||
#define GET_UINT32BE(n, b, i) \
|
||||
{ \
|
||||
(n) = ((uint) (b)[(i)] << 24) \
|
||||
| ((uint) (b)[(i) + 1] << 16) \
|
||||
| ((uint) (b)[(i) + 2] << 8) \
|
||||
| ((uint) (b)[(i) + 3] ); \
|
||||
}
|
||||
#define PUT_UINT32BE(n, b, i) \
|
||||
{ \
|
||||
(b)[(i) ] = (u8) ((n) >> 24); \
|
||||
(b)[(i) + 1] = (u8) ((n) >> 16); \
|
||||
(b)[(i) + 2] = (u8) ((n) >> 8); \
|
||||
(b)[(i) + 3] = (u8) ((n) ); \
|
||||
}
|
||||
#define GET_UINT32BE(n, b, i) \
|
||||
{ \
|
||||
(n) = ((uint) (b)[(i)] << 24) \
|
||||
| ((uint) (b)[(i) + 1] << 16) \
|
||||
| ((uint) (b)[(i) + 2] << 8) \
|
||||
| ((uint) (b)[(i) + 3] ); \
|
||||
}
|
||||
#define PUT_UINT32BE(n, b, i) \
|
||||
{ \
|
||||
(b)[(i) ] = (u8) ((n) >> 24); \
|
||||
(b)[(i) + 1] = (u8) ((n) >> 16); \
|
||||
(b)[(i) + 2] = (u8) ((n) >> 8); \
|
||||
(b)[(i) + 3] = (u8) ((n) ); \
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
u32 K[32];
|
||||
u32 K[32];
|
||||
} CAST_KEY;
|
||||
|
||||
#define GETBYTE(x, y) (uint)(u8)((x)>>(8*(y)))
|
||||
@ -32,18 +32,18 @@ typedef struct {
|
||||
#define U8d(x) GETBYTE(x,0)
|
||||
|
||||
/* CAST uses three different round functions */
|
||||
#define _CAST_f1(l, r, km, kr) \
|
||||
t = hc_rotl32_S(km + r, kr); \
|
||||
l ^= ((s_S[0][U8a(t)] ^ s_S[1][U8b(t)]) - \
|
||||
s_S[2][U8c(t)]) + s_S[3][U8d(t)];
|
||||
#define _CAST_f2(l, r, km, kr) \
|
||||
t = hc_rotl32_S(km ^ r, kr); \
|
||||
l ^= ((s_S[0][U8a(t)] - s_S[1][U8b(t)]) + \
|
||||
s_S[2][U8c(t)]) ^ s_S[3][U8d(t)];
|
||||
#define _CAST_f3(l, r, km, kr) \
|
||||
t = hc_rotl32_S(km - r, kr); \
|
||||
l ^= ((s_S[0][U8a(t)] + s_S[1][U8b(t)]) ^ \
|
||||
s_S[2][U8c(t)]) - s_S[3][U8d(t)];
|
||||
#define _CAST_f1(l, r, km, kr) \
|
||||
t = hc_rotl32_S(km + r, kr); \
|
||||
l ^= ((s_S[0][U8a(t)] ^ s_S[1][U8b(t)]) - \
|
||||
s_S[2][U8c(t)]) + s_S[3][U8d(t)];
|
||||
#define _CAST_f2(l, r, km, kr) \
|
||||
t = hc_rotl32_S(km ^ r, kr); \
|
||||
l ^= ((s_S[0][U8a(t)] - s_S[1][U8b(t)]) + \
|
||||
s_S[2][U8c(t)]) ^ s_S[3][U8d(t)];
|
||||
#define _CAST_f3(l, r, km, kr) \
|
||||
t = hc_rotl32_S(km - r, kr); \
|
||||
l ^= ((s_S[0][U8a(t)] + s_S[1][U8b(t)]) ^ \
|
||||
s_S[2][U8c(t)]) - s_S[3][U8d(t)];
|
||||
|
||||
#define _CAST_F1(l, r, i, j) _CAST_f1(l, r, K[i], K[i+j])
|
||||
#define _CAST_F2(l, r, i, j) _CAST_f2(l, r, K[i], K[i+j])
|
||||
|
@ -440,9 +440,9 @@ KERNEL_FQ void m31900_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha512_tmp_t, pbkdf2_sh
|
||||
+ is_valid_printable_32 (pt_buf[2])
|
||||
+ is_valid_printable_32 (pt_buf[3]);
|
||||
|
||||
if (correct_b1 != 4) return;
|
||||
if (correct_b1 != 4) return;
|
||||
|
||||
// proceed with second block to further reduce false-positives
|
||||
// proceed with second block to further reduce false-positives
|
||||
|
||||
AES256_decrypt (ks, ct_buf+4, pt_buf+4, s_td0, s_td1, s_td2, s_td3, s_td4);
|
||||
|
||||
@ -456,8 +456,8 @@ KERNEL_FQ void m31900_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha512_tmp_t, pbkdf2_sh
|
||||
+ is_valid_printable_32 (pt_buf[6])
|
||||
+ is_valid_printable_32 (pt_buf[7]);
|
||||
|
||||
if (correct_b2 != 4) return;
|
||||
|
||||
if (correct_b2 != 4) return;
|
||||
|
||||
const u32 r0 = ct_buf[0];
|
||||
const u32 r1 = ct_buf[1];
|
||||
const u32 r2 = ct_buf[2];
|
||||
|
@ -69,7 +69,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
hc_token_t token;
|
||||
|
||||
memset (&token, 0, sizeof (hc_token_t));
|
||||
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
token.sep[0] = hashconfig->separator;
|
||||
|
@ -70,7 +70,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
hc_token_t token;
|
||||
|
||||
memset (&token, 0, sizeof (hc_token_t));
|
||||
|
||||
|
||||
token.token_cnt = 4;
|
||||
|
||||
token.signatures_cnt = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user