A
A
Alexander Sharomet2016-08-17 14:52:50
Laravel
Alexander Sharomet, 2016-08-17 14:52:50

Why does laravel produce a different hash each time?

Hello.
Faced such a problem.
When I use the function,
Hash::make();
it gives me different data every time:

echo Hash::make('12345'); //$2y$10$goOxBdpi5lMHdojCPb0gSeDgLkXM4/9Pq.nNDClmRpAfsxWqvo.te
echo Hash::make('12345'); //2y$10$nAhzSoKz94EpcmN81K2ulu15vF58h3zy6lIxNFINwPpRjmbaKR90C

How then to hash the user's password if it cannot be compared later?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2016-08-17
@sharomet

You need to read the documentation: https://laravel.com/docs/5.2/hashing , section "Verifying A Password Against A Hash".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question