[Plugin] Bcrypt
#25

Quote:
Originally Posted by xkirill
View Post
I have a few questions
  • Does it work with CentOS ?
  • And how do I know what is the maximum cost I can put in ?
  • If I change the cost someday with already a few accounts hashed with the previous cost, will their password still work after I change the cost ?
1. I'm not quite sure whether or not the plugin will compile on CentOS. The plugin requires C++11 or C++0x, which are present on most modern OSes, but I've never used CentOS, so I can't speak for it.

2. The minimum cost is 4 and the maximum cost is 31. However, you should find a cost that takes about 100-300 ms to calculate on the specific server in question. You can do this for instance by measuring the time using GetTickCount() and trying a couple of different costs. Usually costs 10-12 are suitable.

3. You can freely change the cost on the fly, and the old hashes will still work. Bcrypt_check will work regardless of the cost of the hash (which is identified automatically).

If you're ever planning to change the cost, it is recommended to update the old hashes as well when a player signs in. You can use function bcrypt_needs_rehash to check if the password needs to be rehashed and updated in the database. I could add an example of this to the repository.
Reply


Messages In This Thread
Bcrypt (Password hash) - by Johnson_boy - 25.07.2013, 12:59
AW: Bcrypt - by Poket-Jony - 25.07.2013, 13:02
Re: Bcrypt - by Djole1337 - 25.07.2013, 13:17
Re: Bcrypt - by roschti - 25.07.2013, 13:52
AW: Bcrypt - by BigETI - 25.07.2013, 14:24
Re: Bcrypt - by Johnson_boy - 25.07.2013, 14:30
Re: Bcrypt - by Johnson_boy - 25.07.2013, 16:33
Re: Bcrypt - by Edvin - 25.07.2013, 17:54
Re: Bcrypt - by Maxips2 - 25.07.2013, 19:30
AW: Bcrypt - by BigETI - 25.07.2013, 20:37
Re: AW: Bcrypt - by Johnson_boy - 25.07.2013, 21:59
Re: Bcrypt - by Red_Dragon. - 26.07.2013, 03:09
Re: Bcrypt - by Dan.. - 26.07.2013, 07:12
Re: Bcrypt - by Niko_boy - 26.07.2013, 07:20
Re: Bcrypt - by Johnson_boy - 26.07.2013, 17:23
Re: Bcrypt - by Dan.. - 26.07.2013, 18:27
AW: Re: Bcrypt - by BigETI - 26.07.2013, 23:32
Re: Bcrypt - by Lorenc_ - 27.07.2013, 01:43
Re: Bcrypt - by Dan.. - 27.07.2013, 07:51
Re: Bcrypt - by Johnson_boy - 28.07.2013, 12:10
Re: Bcrypt - by Johnson_boy - 06.08.2013, 23:45
Respuesta: Bcrypt - by GutierrezDeVelasco - 25.01.2014, 21:40
Respuesta: Bcrypt - by GutierrezDeVelasco - 25.01.2014, 21:49
Re: Bcrypt - by Kaperstone - 20.07.2014, 22:10
Re: Bcrypt - by Johnson_boy - 21.07.2014, 08:11
Re: Bcrypt - by maddinat0r - 21.07.2014, 20:07
Re: Bcrypt - by Sonical - 28.07.2014, 20:44
Re: Bcrypt - by Kaperstone - 28.08.2014, 23:30
Re: Bcrypt - by Kaperstone - 18.11.2014, 02:50
Re: Bcrypt - by Johnson_boy - 20.11.2014, 22:03
Re: Bcrypt - by Kaperstone - 21.11.2014, 04:49
Re : Bcrypt - by Maxime_Creteur - 25.11.2014, 18:21
Re : Bcrypt - by Nealll - 28.11.2014, 18:48
Re: Re : Bcrypt - by Johnson_boy - 28.11.2014, 20:35
Re : Bcrypt - by Nealll - 29.11.2014, 06:40
Re: Bcrypt - by Kaperstone - 01.12.2014, 13:33
Re : Bcrypt - by Nealll - 01.12.2014, 15:49
Re: Bcrypt - by Johnson_boy - 01.12.2014, 23:49
Re: Bcrypt - by ProKillerpa - 01.12.2014, 23:51
Re : Bcrypt - by Nealll - 02.12.2014, 18:20

Forum Jump:


Users browsing this thread: 14 Guest(s)