mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-23 00:28:11 +00:00
More code style changes
This commit is contained in:
parent
7904b9ae05
commit
8b2af6b207
@ -254,6 +254,7 @@ void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl
|
||||
debugfile_ctx_t *debugfile_ctx = hashcat_ctx->debugfile_ctx;
|
||||
loopback_ctx_t *loopback_ctx = hashcat_ctx->loopback_ctx;
|
||||
hashes_t *hashes = hashcat_ctx->hashes;
|
||||
hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
|
||||
|
||||
const u32 salt_pos = plain->salt_pos;
|
||||
const u32 digest_pos = plain->digest_pos; // relative
|
||||
@ -276,7 +277,7 @@ void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl
|
||||
build_plain (hashcat_ctx, device_param, plain, plain_buf, &plain_len);
|
||||
|
||||
// TOTP should be base32 encoded
|
||||
if (hashcat_ctx->hashconfig->hash_mode == KERN_TYPE_TOTP_HMACSHA1)
|
||||
if (hashconfig->hash_mode == KERN_TYPE_TOTP_HMACSHA1)
|
||||
{
|
||||
// we need a temp buffer for the base32 encoding
|
||||
u32 temp_buf[64] = { 0 };
|
||||
|
@ -5189,11 +5189,11 @@ int totp_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSE
|
||||
|
||||
const int rc_tokenizer = input_tokenizer (input_buf, input_len, &token);
|
||||
|
||||
if (rc_tokenizer != PARSER_OK) return (rc_tokenizer);
|
||||
|
||||
// now we need to reduce our hash into a token
|
||||
int otp_code = hc_strtoul ((const char *) input_buf, NULL, 10);
|
||||
|
||||
if (rc_tokenizer != PARSER_OK) return (rc_tokenizer);
|
||||
|
||||
digest[1] = otp_code;
|
||||
|
||||
u8 *salt_pos = token.buf[1];
|
||||
|
Loading…
Reference in New Issue
Block a user