Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+6 votes
1.7k views
in Q2A Core by
Does Question2Answer use SHA1 or MD5 for password encryption? Also, are the passwords stored in the row "passsalt"?

I need to know this for integrating wordpress with question2answer.

1 Answer

+5 votes
by
selected by
 
Best answer

See qa-db-users.php, it is SHA1. Here is the exact code:

sha1(substr($salt, 0, 8).$password.substr($salt, 8));

The passsalt field in the database is the password salt (a random character string stored with each password). And passcheck is the actual encrypted password generated via the code above.

by
if any is interested the password (passcheck) is stored as binary and needs to be converted to hex -hex function in mysql.
by
A more updated answer can be found here fro version of Q2A above v1.8: https://www.question2answer.org/qa/30100/how-to-change-a-user-password-from-the-database

Get the password from PHP : echo password_hash('new_pass', 1);
Then update passhash
...