MD5 problem...
#1

Good evening to you.

So now, I use my PHPbb forum.
I as a project to link accounts PHPbb my SAMP server.
So what I do:
- When someone registers on the forum, the password is encrypted with MD5.
- If someone logs on the server and it does not account forum = Kick.
- By cons, if any, it can connect to, and must enter the password to connect to the forum.

And that's the problem, as it is encrypted in MD5, how to compare the password for the forum to be compatible with the GM?

Thank you.
Reply
#2

This plugin has an MD5 cryptographic hashing function:

https://sampforum.blast.hk/showthread.php?tid=152682

pawn Код:
new
    str[128];

md5(inputtext, str);
However, MD5 is horribly insecure nowadays - I would advise you stick to your own account system as players should use different passwords for every resource.
Reply
#3

I would advise AGAINST using your own account system because as insecure as MD5 may be, your own system will be worse! That at least was devised by experts. If you can, get one that uses bcrypt and salts.

Anyway, in answer to your original question - you have to compare the hashes, not compare the passwords. If you want to know if an entered password is correct, hash it with MD5 (be careful with case), and compare that result with the hash stored in your database. There is no way (or shouldn't be) to get the original password from the stored hash. PHPBB may also run several rounds of MD5 hashing - check how many times they re-hash the result and do the same in your code.
Reply
#4

I want to know how to use an already hashed password to use to connect to my server ..
Reply
#5

FOR SHA1 PLEASE
Reply
#6

Exactly what I already said, but replace "MD5" with "SHA1".
Reply
#7

I went to FluxBB, but suddenly it is SHA1.
So how to check the hash to connect to the server with the same password forum?
Reply
#8

Have you even READ my first post?
Reply
#9

Yes I looked, it is not possible to do so?
Reply
#10

It is possible, just try to do it by yourself. Nobody will provide whole code for you. If you have some bugs with it, you can again post with your codes so anyone could assist.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)