open.mp forum
[Pawn] HELP! How to get better recommend than `udb_hash()` and bcrypt system? - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] HELP! How to get better recommend than `udb_hash()` and bcrypt system? (/showthread.php?tid=2036)



HELP! How to get better recommend than `udb_hash()` and bcrypt system? - PutuSuhartawan - 2021-05-19

People need to secure the password from the communist.

Code:
Example



main(){

bcrypt_hash(0,"OnPassswordHash","text",12);

}



forward OnPassswordHash(playerid);

public OnPassswordHash(playerid){

new dest[60];

bcrypt_get_hash(dest);

bcrypt_verify(playerid,"OnPassswordVerify","text",dest);

}



forward OnPassswordVerify(playerid,bool:success);

public OnPassswordVerify(playerid,bool:success){

//success denotes verifying was successful or not

if(success){

//verfied

} else{

//hash doesn't match with text

}

}



RE: HELP! How to get better recommend than `udb_hash()` and bcrypt system? - Y_Less - 2021-05-19

BCrypt is fine. Not how you're using it, but done correctly it is. udb_hash is just not a password system. I'm not even going to explain why - NEVER EVER use it.