BAT_MAN
Member level 5
I have been given the hash algorithm and guess the hash of all password range between 1 to 65537 but how i can guess the password that hash correspond to the correct stored password hash where size of password is maximum 20 charaters.
ULONG Hash(TCHAR *szText)
{
ULONG hash = 17;
TCHAR ch;
int i;
for (i=0; ch=szText; i++)
{
hash += ch * (31*i+1);
hash %= 65537;
}
return hash;
}
ULONG Hash(TCHAR *szText)
{
ULONG hash = 17;
TCHAR ch;
int i;
for (i=0; ch=szText; i++)
{
hash += ch * (31*i+1);
hash %= 65537;
}
return hash;
}