mirror of
https://github.com/hashcat/hashcat.git
synced 2025-07-09 16:18:19 +00:00
Don't duplicate existing functionality
This commit is contained in:
parent
1d43540fc4
commit
27366c3eff
@ -5200,14 +5200,10 @@ int totp_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSE
|
|||||||
digest[1] = otp_code;
|
digest[1] = otp_code;
|
||||||
|
|
||||||
u8 *salt_pos = token.buf[1];
|
u8 *salt_pos = token.buf[1];
|
||||||
int salt_len = token.len[1];
|
|
||||||
|
|
||||||
// convert ascii timestamp to ulong timestamp
|
// convert ascii timestamp to ulong timestamp
|
||||||
unsigned long timestamp = 0;
|
unsigned long timestamp = 0;
|
||||||
for(int i = 0; i<salt_len; i++)
|
timestamp = hc_strtoul((const char *) salt_pos, NULL, 10);
|
||||||
{
|
|
||||||
timestamp = timestamp * 10 + ( *(salt_pos + i) - '0');
|
|
||||||
}
|
|
||||||
|
|
||||||
// divide our timestamp by our step. We will use the RFC 6238 default of 30 for now
|
// divide our timestamp by our step. We will use the RFC 6238 default of 30 for now
|
||||||
timestamp /= 30;
|
timestamp /= 30;
|
||||||
|
Loading…
Reference in New Issue
Block a user