Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Implements symfony1 password encoding for Symfony2 security component
<?php
namespace Security\Encoder;
use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder;
/**
* Implements symfony1 password encoding
*
* @see PluginsfGuardUser::checkPasswordByGuard()
*
* @author Jérôme TAMARELLE <jerome@tamarelle.net>
*/
class Symfony1GuardPasswordEncoder extends MessageDigestPasswordEncoder
{
public function __construct()
{
parent::__construct('sha1', false, 1);
}
/**
* {@inheritDoc}
*/
protected function mergePasswordAndSalt($password, $salt)
{
return $salt . $password;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.