Laravel Auth Check width passwords already encrypted in SQL SERVER

707 views Asked by At

I have passwords already encrypted in a SQL Server database. When I try to check the password entered in the Laravel app, it doesn't match with the password in the DB. How can I match these passwords? Are they encrypted differently?

2

There are 2 answers

0
Khan Shahrukh On

To validate the password entered by the user with the password you have stored in the dB use

if(Hash::check($userentry,$dbentry))
   {
      //if we are under this scope that means supplied password matches with the password in dB 
   }
0
Juluri Vinay On

Insert password field with Hash class and make() method.

Below is an example:

$user->password = Hash::make(Input::get('pswd'));