When passwords, salt, and all that non sense are stored into xf_user_authenticate are they sent as a string or something else. From what I've gather it's binary but a closer look when I use SELECT it's in a table format serialized. I guess my question how do you serialize it.
If you remotely understand lua take a look at this.
This is a project I'm heading up for garry's mod communities. My code is available here.
If you remotely understand lua take a look at this.
Code:
salt = self:Salt(64)
pass = string.lower(tostring(pass))
pass = string.lower(crypto.sha256(pass))
pass = string.lower(crypto.sha256(pass .. salt))
hash = 'a:3:{s:4:\"hash\";s:64:\"' .. pass .. '\";s:4:\"salt\";s:64:\"' .. salt .. '\";s:8:\"hashFunc\";s:6:\"sha256\";}'
local query2 = database:query("INSERT INTO " .. Prefix .. "_user (`username`, `email`, `user_group_id`, `register_date`, `user_state`) VALUES ('" .. escape(user) .. "', '" .. escape(email) .. "', '" .. group .. "', '" .. regdate .. "', '" .. escape('valid') .. "')")
This is a project I'm heading up for garry's mod communities. My code is available here.