What is pw_len of the pw type ? - Printable Version +- hashcat Forum (https://hashcat.net/forum) +-- Forum: Developer (https://hashcat.net/forum/forum-39.html) +--- Forum: hashcat (https://hashcat.net/forum/forum-40.html) +--- Thread: What is pw_len of the pw type ? (/thread-8999.html) |
What is pw_len of the pw type ? - tachsah - 02-26-2020 Hi all, When looking at the source code of Hashcat I noticed that the candidate passwords are stored in a type called pw (defined line 1643 of OpenCL/inc_types.h). This type is simple, the code is this Code: typedef struct pw Suppose my password is "hashcat" (7 chars long), we sould have something like pw.i[0] = hash pw.i[1] = cat0 (I'm guessing that all "unused" bytes are null bytes) pw.i[2] = 0 ... in that case is pw_len 2 or 7 ? I'm trying to implement FNV1 as an exercise and for this algorithm I need to iterate over every byte of data. If pw_len is the length of the pw.i array, is there another way to get the length in bytes of the candidate password ? Thanks a lot in advance RE: What is pw_len of the pw type ? - philsmd - 02-26-2020 yes u32[] means that each item consist of 4 bytes, i.e. 64 * 4 = 256 maximum password length pw_len is the length in bytes, of course (everything else wouldn't make sense). each additional character/byte in i[] would imply that pw_len increases with 1 RE: What is pw_len of the pw type ? - tachsah - 02-26-2020 (02-26-2020, 01:14 PM)philsmd Wrote: yes u32[] means that each item consist of 4 bytes, i.e. 64 * 4 = 256 maximum password lengthGreat, thank you for your quick response |