samedi 31 octobre 2015

why is the hash-method in the seeder different from the hash-method in the controller? Laravel 5.1

In my seeder I have hashed my code like this :

'validCode' => Hash::make('1110578abc')

it gives this result in the database : $2y$10$GaKhhxrMNCnzr

When I'm hashing the same code by input in my controller it gives a different value

Controller :

dd(Hash::make(Input::get('code')));

(I typed in 1110578abc in this input field.)

It gives me this value :

$2y$10$xxVU78CphJEGOOTT1teNY.LeLb7kBjDvP9Npbf1h4.T4HDtuIFD16

Can annyone explain why this is not the same value? For my application I would like to have the same value from my database, in my controller from the input field, to check if they match.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire