Jump to content

[ Solved ] Hashing Passwords


Recommended Posts

Well, salt is randomly created string and putted to ip board's database.

So if you found where the member's salt is ( members table ) do

local hashedPassword = string.lower ( string.lower ( md5 ( salt ) ) .. string.lower ( md5 ( password ) ) ) 

For what those string.lowers? PHP's md5 is generated in low leathers, but lua's is in big leathers. That would work, couse I was working with IPB and MTA server.

Link to comment

Well i know now why it sayed Bad Argument. I found in this Forum a other thread: https://forum.multitheftauto.com/viewtopic.php?f=91&t=57981

it says to use:

md5(md5(salt):lower()..md5(password):lower()):lower() 

ive got some little problems with salt ... but i fixed it. Anyway thanks a lot for the support. :)

For those Guys who have the same Problem, i hope that can help you:

local password = "asdf" 
setElementData(source, "salt_temp", data["members_pass_salt"]) 
local salt = getElementData(source, "salt_temp") 
passwordTEXThashed = md5(md5(salt):lower()..md5(password):lower()):lower() 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...