kekrozsak/src/KekRozsak/SecurityBundle/Service/CryptEncoder.php
Polonkai Gergely e1fde17057 Finished authentication
Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
2012-07-02 22:41:06 +02:00

19 lines
347 B
PHP

<?php
namespace KekRozsak\SecurityBundle\Service;
use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface;
class CryptEncoder implements PasswordEncoderInterface
{
function encodePassword($raw, $salt)
{
return crypt($raw);
}
function isPasswordValid($encoded, $raw, $salt)
{
return (crypt($raw, $salt) == $encoded);
}
}