Permalink
Browse files

Commit changes

  • Loading branch information...
GautamGupta committed Apr 14, 2012
1 parent f81c8e2 commit 6021e34fa494a44933e684d4a95552d6683998b3
Showing with 134 additions and 91 deletions.
  1. +8 −2 class.ls-pass.php
  2. +120 −88 class.ls-users.php
  3. +6 −1 gp-config.php
View
@@ -16,15 +16,17 @@ class WP_Pass {
* @return string The hash string of the password
*/
function hash_password($password) {
global $wp_hasher;
/* global $wp_hasher;
if ( empty($wp_hasher) ) {
require_once( BACKPRESS_PATH . 'class.passwordhash.php');
// By default, use the portable hash from phpass
$wp_hasher = new PasswordHash(8, TRUE);
}
return $wp_hasher->HashPassword($password);
return $wp_hasher->HashPassword($password); */
return hash('sha256', $password);
}
/**
@@ -48,6 +50,7 @@ function hash_password($password) {
* @return bool False, if the $password does not match the hashed password
*/
function check_password($password, $hash, $user_id = '') {
/*
global $wp_hasher, $wp_users_object;
list($hash, $broken) = array_pad( explode( '---', $hash ), 2, '' );
@@ -73,6 +76,9 @@ function check_password($password, $hash, $user_id = '') {
}
$check = $wp_hasher->CheckPassword($password, $hash);
*/
$check = $hash == WP_Pass::hash_password($password);
return apply_filters('check_password', $check, $password, $hash, $user_id);
}
Oops, something went wrong.

0 comments on commit 6021e34

Please sign in to comment.