Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Astrups\SpectacleBundle\Service;
- use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface;
- class Sha1Salted implements PasswordEncoderInterface
- {
- public function encodePassword($raw, $salt)
- {
- return sha1($raw . $salt);
- }
- public function isPasswordValid($encoded, $raw, $salt)
- {
- return $encoded === $this->encodePassword($raw, $salt);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement