SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 06/08/2013, 11:45 PM   #21
Johnson_boy
Huge Clucker
 
Join Date: Mar 2011
Location: Finland
Posts: 215
Reputation: 80
Default Re: Bcrypt

Support for Windows added, precompiled binary (dll) is now available.
Johnson_boy is offline   Reply With Quote
Old 25/01/2014, 09:40 PM   #22
GutierrezDeVelasco
Little Clucker
 
GutierrezDeVelasco's Avatar
 
Join Date: Dec 2013
Location: Mexico
Posts: 28
Reputation: 5
Default Respuesta: Bcrypt

I need some help with this, i cant seem to find the plugin file but there is a c++ file named plugin and what do i do with all those c++ files i have no idea.
please help
GutierrezDeVelasco is offline   Reply With Quote
Old 25/01/2014, 09:49 PM   #23
GutierrezDeVelasco
Little Clucker
 
GutierrezDeVelasco's Avatar
 
Join Date: Dec 2013
Location: Mexico
Posts: 28
Reputation: 5
Default Respuesta: Bcrypt

lol nevermind i downloaded the wrong file :P
GutierrezDeVelasco is offline   Reply With Quote
Old 20/07/2014, 10:10 PM   #24
Kaperstone
Banned
 
Join Date: May 2011
Location: Russia
Posts: 3,024
Reputation: 824
Default Re: Bcrypt

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 ?
Kaperstone is offline   Reply With Quote
Old 21/07/2014, 08:11 AM   #25
Johnson_boy
Huge Clucker
 
Join Date: Mar 2011
Location: Finland
Posts: 215
Reputation: 80
Default Re: Bcrypt

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.
Johnson_boy is offline   Reply With Quote
Old 21/07/2014, 08:07 PM   #26
maddinat0r
Banned
 
Join Date: Jun 2010
Location: Germany
Posts: 848
Reputation: 482
Default Re: Bcrypt

The highest compiler version on CentOS 6 is gcc 4.4, which supports almost none of the C++11 features. Only CentOS 7 (gcc 4.7.x) has proper support for C++11. So only CentOS 7 can run this plugin and I also encourage every server owner to upgrade to CentOS 7 (if you are using CentOS 6 ofc), because not using C++11 features really sucks if you are a plugin developer.
maddinat0r is offline   Reply With Quote
Old 28/07/2014, 08:44 PM   #27
Sonical
Little Clucker
 
Sonical's Avatar
 
Join Date: Jan 2014
Posts: 11
Reputation: 0
Default Re: Bcrypt

Nice working
Sonical is offline   Reply With Quote
Old 28/08/2014, 11:30 PM   #28
Kaperstone
Banned
 
Join Date: May 2011
Location: Russia
Posts: 3,024
Reputation: 824
Default Re: Bcrypt

In the example
pawn Code:
bcrypt_check(playerid, BCRYPT_LOGIN, inputtext, hash);
I believe it should be
pawn Code:
bcrypt_check(inputtext, hash, "OnPasswordChecked", "d",playerid);
Kaperstone is offline   Reply With Quote
Old 18/11/2014, 02:50 AM   #29
Kaperstone
Banned
 
Join Date: May 2011
Location: Russia
Posts: 3,024
Reputation: 824
Default Re: Bcrypt

I am running the plugin on Debian 7.7, gcc version 4.7.2-5
The plugin loads and everything looks fine on the server log, but the callbacks are never called.
I put a print function in, to indicate when the callback is being called but it never prints it nor updates the password.
Quote:
[03:18:06] plugin.bcrypt: The plugin is up-to-date.
[03:18:05] Loading plugin: bcrypt-samp.so
[03:18:05] plugin.bcrypt v2.2.2 was loaded.
[03:18:05] plugin.bcrypt: 5 cores detected, 4 threads will be used.
[03:18:05] Loaded.
On my localhost - Win7 64bit it loads and works fine.
Kaperstone is offline   Reply With Quote
Old 20/11/2014, 10:03 PM   #30
Johnson_boy
Huge Clucker
 
Join Date: Mar 2011
Location: Finland
Posts: 215
Reputation: 80
Default Re: Bcrypt

Quote:
Originally Posted by xkirill View Post
I am running the plugin on Debian 7.7, gcc version 4.7.2-5
The plugin loads and everything looks fine on the server log, but the callbacks are never called.
I put a print function in, to indicate when the callback is being called but it never prints it nor updates the password.

On my localhost - Win7 64bit it loads and works fine.
Are you using bcrypt-samp-v2.2.2-debian_7.tar.gz from the Releases page on GitHub?
Johnson_boy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 03:46 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.