From 28d11f15bb0abb50c439755f6b6265c39d7b875d Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 6 Jul 2011 14:26:04 -0700 Subject: [PATCH] Refactoring Hash class. --- system/hash.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/system/hash.php b/system/hash.php index 66a87e2d..6bbeda10 100644 --- a/system/hash.php +++ b/system/hash.php @@ -25,15 +25,7 @@ class Hash { */ public function __construct($value, $salt = null) { - // ------------------------------------------------------- - // If no salt is given, we'll create a random salt to - // use when hashing the password. - // - // Otherwise, we will use the given salt. - // ------------------------------------------------------- - $this->salt = (is_null($salt)) ? Str::random(16) : $salt; - - $this->value = sha1($value.$this->salt); + $this->value = sha1($value.$this->salt = (is_null($salt)) ? Str::random(16) : $salt); } /**