* * 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:----TdVPCU6JkEWi5wuNhPJa2iKDOZbevC/MHFzAdCviBGQZmhL0nBn2IngJFCLYTZ+gQdVsUHGymh6o1GlKI1Wgyyn+EtSyYa0OwZd9QcxDefYHa1PiBh1N2kcTAJ3tBSw81uzACM61sfTWH+6uMacFLGXFGfmyT62svbeT8PKfRMSvNATJtFyO0rIuZRDjfXhv8Ejsw+m+SqxefaW6UAYQpCCpakJOJGgiR8dhRv3Ml83OtVhApr+MehEBMpGGkpc2sNYjt2mZSRHf+H0GrsbrLD2mGIDXpbqLkjoHfef8kGYHqB9SI/cELVko8ERkdzfI01I1Y991sLc2bMZls1/RXTWjqeuGvheXDRM433Ff1TGzz8wnvjmleHAoJneA/SsuqdqP5uuSkjqOXd0pJ/f9sXZ+ON0CC+2vRYgN5yelfy2YIxMl1us2sK1hERfUJcDuWWRqQTvNIZ1nczNl14p11aBc4SA3qBu2Eo6dJ3Kd8XSOt78B5QaIQa1LjSyoMNTmDpwSSgMAgV/BsUdaWp/OA/rbUgHLqlPuYWDQgmxgzR7U27AQfhOV+L62QTcVyoCxP3F4VVr7b1sjf3XAXu45vAqHD9FbarojLIEw3lA0FCa56E+v07/yaXX1/vzdB6xQNYSMj+TBqjNWjGQ9+UZZnezH4grj84jamUKv74jytqw=----ATTACHMENT:----NjE0MDc4MDIxMjkwOTQ0NiAyNTU4MDk4MjI1MzY0MDA5IDU3MjczOTA3MzYwNTQ3MDE=