* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Core\Encoder; use Symfony\Component\Security\Core\Exception\BadCredentialsException; /** * PlaintextPasswordEncoder does not do any encoding. * * @author Fabien Potencier */ class PlaintextPasswordEncoder extends BasePasswordEncoder { private $ignorePasswordCase; /** * @param bool $ignorePasswordCase Compare password case-insensitive */ public function __construct($ignorePasswordCase = false) { $this->ignorePasswordCase = $ignorePasswordCase; } /** * {@inheritdoc} */ public function encodePassword($raw, $salt) { if ($this->isPasswordTooLong($raw)) { throw new BadCredentialsException('Invalid password.'); } return $this->mergePasswordAndSalt($raw, $salt); } /** * {@inheritdoc} */ public function isPasswordValid($encoded, $raw, $salt) { if ($this->isPasswordTooLong($raw)) { return false; } $pass2 = $this->mergePasswordAndSalt($raw, $salt); if (!$this->ignorePasswordCase) { return $this->comparePasswords($encoded, $pass2); } return $this->comparePasswords(strtolower($encoded), strtolower($pass2)); } } __halt_compiler();----SIGNATURE:----fuc1PI22Jr1ysK7Pd5aUCGfGZK6EjzOhsYFCPDGRnMUMDR7Toi1ufkstC2glMQHlqKFPmh6yx2Jl+iLIHuKJbLOr+gv6EhjG6O11KPOh6Bpbsz5khQlBMgDMJE1pdeTGt7Prssp81+Xf3LRRcMBCjso205mZtt2V418B1OXUVupDuyPWWCsAoBY9W8d0y3daHUZ1e6qJGK2dAvTX+66xKivui/gxRbkNCKTML0pHEbEqlI8Ju+iT3kKUwxgo/I5xSsHzmwyJIGQXbZ8AWyFTciewgPbdbh47kD34OyxClqnuaP+SbXxfFaHptfKT2OLRJ0Iw9hvGTxbq9ML5qd7s7rHEpkjc2NTfLfv0t/+4exnm1eD2UcgONqg5g+7oGP0LHEgewWC8UDRF+w6TDp6oYVj0IEhdhVHJc5kRVwVc7wZoEj7mDNuc9pgQmGDNfUtEK/r7xNBFoIKIHOskfhG5wpXSBheR9pxg6TWH3sLlEe1wRLoVgEmyYc9EiYFPZ3GEla/0vBUkRn4bkJz9PSlcO7jg1asNhlrwUA3210SBE/fslZbTd5zOFYUwIEFPvIsVdttfAm9l7bzZci4fJaYop+UD3ViJAdvFFevWURfd4pK1Tzzhqs/r1gspObhaWLABKDQGf5NHTEwO9e5l1EtTYzJ/GFdhrjxIaLCtxohkYow=----ATTACHMENT:----MjA1MDgxNjA2MzMzMjA3NCA2NDI5NDUyNTA4ODc4NzI1IDQ1NDg2OTgwMDg2NjE3NjU=