2 ms·
I believe that the work factor is encoded with the hash, so bcrypt can identify which work factor to use.
by mshafrir 15y ago
I believe that the work factor is encoded with the hash, so bcrypt can identify which work factor to use.
- Khao 15y agoThanks for your answer. At first I though it didn't make sense because the hash should be one-way and bcrypt should not decrypt the hash or mess around with it other than comparing it with what the user entered but I have searched a bit more and found this post on stackoverflow that explains in detail : http://stackoverflow.com/questions/4443476/optimal-bcrypt-work-factor http://stackoverflow.com/questions/4443476/optimal-bcrypt-wo... Your answer was right, it stores the work factor, the salt and the hash so that at any given time you can change the work factor and it will adjust in the database!