diff options
Diffstat (limited to 'Core/Encoder')
-rw-r--r-- | Core/Encoder/BasePasswordEncoder.php | 4 | ||||
-rw-r--r-- | Core/Encoder/EncoderFactory.php | 2 | ||||
-rw-r--r-- | Core/Encoder/EncoderFactoryInterface.php | 2 | ||||
-rw-r--r-- | Core/Encoder/MessageDigestPasswordEncoder.php | 8 | ||||
-rw-r--r-- | Core/Encoder/PasswordEncoderInterface.php | 4 | ||||
-rw-r--r-- | Core/Encoder/PlaintextPasswordEncoder.php | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/Core/Encoder/BasePasswordEncoder.php b/Core/Encoder/BasePasswordEncoder.php index 01f471c..58c64db 100644 --- a/Core/Encoder/BasePasswordEncoder.php +++ b/Core/Encoder/BasePasswordEncoder.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony package. * - * (c) Fabien Potencier <fabien.potencier@symfony-project.com> + * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,7 @@ namespace Symfony\Component\Security\Core\Encoder; /** * BasePasswordEncoder is the base class for all password encoders. * - * @author Fabien Potencier <fabien.potencier@symfony-project.com> + * @author Fabien Potencier <fabien@symfony.com> */ abstract class BasePasswordEncoder implements PasswordEncoderInterface { diff --git a/Core/Encoder/EncoderFactory.php b/Core/Encoder/EncoderFactory.php index bc6df06..80a7a61 100644 --- a/Core/Encoder/EncoderFactory.php +++ b/Core/Encoder/EncoderFactory.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony package. * - * (c) Fabien Potencier <fabien.potencier@symfony-project.com> + * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/Core/Encoder/EncoderFactoryInterface.php b/Core/Encoder/EncoderFactoryInterface.php index 2bdf6fc..a4b7d3b 100644 --- a/Core/Encoder/EncoderFactoryInterface.php +++ b/Core/Encoder/EncoderFactoryInterface.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony package. * - * (c) Fabien Potencier <fabien.potencier@symfony-project.com> + * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/Core/Encoder/MessageDigestPasswordEncoder.php b/Core/Encoder/MessageDigestPasswordEncoder.php index 811dd4c..b69cf6e 100644 --- a/Core/Encoder/MessageDigestPasswordEncoder.php +++ b/Core/Encoder/MessageDigestPasswordEncoder.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony package. * - * (c) Fabien Potencier <fabien.potencier@symfony-project.com> + * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,7 @@ namespace Symfony\Component\Security\Core\Encoder; /** * MessageDigestPasswordEncoder uses a message digest algorithm. * - * @author Fabien Potencier <fabien.potencier@symfony-project.com> + * @author Fabien Potencier <fabien@symfony.com> */ class MessageDigestPasswordEncoder extends BasePasswordEncoder { @@ -28,7 +28,7 @@ class MessageDigestPasswordEncoder extends BasePasswordEncoder * @param Boolean $encodeHashAsBase64 Whether to base64 encode the password hash * @param integer $iterations The number of iterations to use to stretch the password hash */ - public function __construct($algorithm = 'sha256', $encodeHashAsBase64 = false, $iterations = 1) + public function __construct($algorithm = 'sha512', $encodeHashAsBase64 = true, $iterations = 5000) { $this->algorithm = $algorithm; $this->encodeHashAsBase64 = $encodeHashAsBase64; @@ -49,7 +49,7 @@ class MessageDigestPasswordEncoder extends BasePasswordEncoder // "stretch" hash for ($i = 1; $i < $this->iterations; $i++) { - $digest = hash($this->algorithm, $digest, true); + $digest = hash($this->algorithm, $digest.$salted, true); } return $this->encodeHashAsBase64 ? base64_encode($digest) : bin2hex($digest); diff --git a/Core/Encoder/PasswordEncoderInterface.php b/Core/Encoder/PasswordEncoderInterface.php index 393b779..dae6c69 100644 --- a/Core/Encoder/PasswordEncoderInterface.php +++ b/Core/Encoder/PasswordEncoderInterface.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony package. * - * (c) Fabien Potencier <fabien.potencier@symfony-project.com> + * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,7 @@ namespace Symfony\Component\Security\Core\Encoder; /** * PasswordEncoderInterface is the interface for all encoders. * - * @author Fabien Potencier <fabien.potencier@symfony-project.com> + * @author Fabien Potencier <fabien@symfony.com> */ interface PasswordEncoderInterface { diff --git a/Core/Encoder/PlaintextPasswordEncoder.php b/Core/Encoder/PlaintextPasswordEncoder.php index e155fbd..48c19fb 100644 --- a/Core/Encoder/PlaintextPasswordEncoder.php +++ b/Core/Encoder/PlaintextPasswordEncoder.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony package. * - * (c) Fabien Potencier <fabien.potencier@symfony-project.com> + * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,7 @@ namespace Symfony\Component\Security\Core\Encoder; /** * PlaintextPasswordEncoder does not do any encoding. * - * @author Fabien Potencier <fabien.potencier@symfony-project.com> + * @author Fabien Potencier <fabien@symfony.com> */ class PlaintextPasswordEncoder extends BasePasswordEncoder { |