equal
deleted
inserted
replaced
430 * |
430 * |
431 * Hash the password |
431 * Hash the password |
432 */ |
432 */ |
433 function phpbb_hash($password) |
433 function phpbb_hash($password) |
434 { |
434 { |
|
435 /* |
435 $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; |
436 $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; |
436 |
437 |
437 $random_state = unique_id(); |
438 $random_state = unique_id(); |
438 $random = ''; |
439 $random = ''; |
439 $count = 6; |
440 $count = 6; |
460 |
461 |
461 if (strlen($hash) == 34) |
462 if (strlen($hash) == 34) |
462 { |
463 { |
463 return $hash; |
464 return $hash; |
464 } |
465 } |
|
466 */ |
465 |
467 |
466 return md5($password); |
468 return md5($password); |
467 } |
469 } |
468 |
470 |
469 /** |
471 /** |
474 * |
476 * |
475 * @return bool Returns true if the password is correct, false if not. |
477 * @return bool Returns true if the password is correct, false if not. |
476 */ |
478 */ |
477 function phpbb_check_hash($password, $hash) |
479 function phpbb_check_hash($password, $hash) |
478 { |
480 { |
|
481 /* |
479 $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; |
482 $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; |
480 if (strlen($hash) == 34) |
483 if (strlen($hash) == 34) |
481 { |
484 { |
482 return (_hash_crypt_private($password, $hash, $itoa64) === $hash) ? true : false; |
485 return (_hash_crypt_private($password, $hash, $itoa64) === $hash) ? true : false; |
483 } |
486 } |
|
487 */ |
484 |
488 |
485 return (md5($password) === $hash) ? true : false; |
489 return (md5($password) === $hash) ? true : false; |
486 } |
490 } |
487 |
491 |
488 /** |
492 /** |