Security

Class Phalcon\Security

implements Phalcon\DI\InjectionAwareInterface

This component provides a set of functions to improve the security in Phalcon applications

$login = $this->request->getPost('login');
$password = $this->request->getPost('password');

$user = Users::findFirstByLogin($login);
if ($user) {
    if ($this->security->checkHash($password, $user->password)) {
            //The password is valid
    }
}

Constants

integer CRYPT_DEFAULT

integer CRYPT_STD_DES

integer CRYPT_EXT_DES

<