summaryrefslogtreecommitdiff
path: root/inc/PassHash.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/PassHash.class.php')
-rw-r--r--inc/PassHash.class.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php
index 2558f37c6..3fb1349d2 100644
--- a/inc/PassHash.class.php
+++ b/inc/PassHash.class.php
@@ -88,7 +88,9 @@ class PassHash {
public function gen_salt($len=32){
$salt = '';
$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
- for($i=0;$i<$len;$i++) $salt .= $chars[mt_rand(0,61)];
+ for($i=0; $i<$len; $i++){
+ $salt .= $chars[mt_rand(0,61)];
+ }
return $salt;
}
@@ -427,7 +429,7 @@ class PassHash {
$this->gen_salt(22);
}
- return crypt($password, $salt);
+ return crypt($clear, $salt);
}
}