Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Password hashing
Hi, I've been reading the forum comments on password hashing going back to October last year. I'm new to php so am doing the very basics at the moment.
I'm trying to use the user names and passwords that people has registered for the forum for other purposes (a bit like toon-c's discussion).
I've managed to extract the user names and passwords from the table. In doing testing, I registered a new user with a password called "the". I then proceed to print a list of all the passwords from the LUM_User Table Password Field. I have copied the following code from the test.php file from phpass main website and incorporated it into my site. However, the hash produced from this snippet of code doesn't match the hashes in the Password field in LUM_User. Any ideas? (PS: I can't use any vanilla authenticate methods because thats beyond my comprehension at the moments, I would get confused with all the includes etc)
Thanks , Chris
***
The output of the hash snippet is Hash: $P$BDeJeLwKVnru7k2PQAFEOlm39irxBp/ Check correct: '1' (should be '1')
***
$ok = 0;
# Try to use stronger but system-specific hashes, with a possible fallback to
# the weaker portable hashes.
$t_hasher = new PasswordHash(8, FALSE);
$correct = "the";
$hash = $t_hasher->HashPassword($correct);
print "Hash: " . $hash . "\n";
$check = $t_hasher->CheckPassword($correct, $hash);
if ($check) $ok++;
print "Check correct: '" . $check . "' (should be '1')\n";
0
Comments