How to add a custom password hashing method?
It's me again with yet more questions.....
How do I go about adding a new (custom) user password hashing method without modifying the framework?
I want to add a very simple new hasing method called "fl" which would simply take md5 of raw password.
I tried adding a new "case" statement to "library/core/class.passwordhash.php" as well as setting appropriate hashing method name in gdn_user HashMethod field. Didn't work. When I try to login the javascript just hangs, only return error if I enter non-existing user name.
Best Answer
-
Todd Vanilla Staff
This isn't something we currently support without modifying the code. If you want a straight md5 hash I just recommend you use the django hash method. You need to augment your password hashes a little bit.
Let's say your md5 is something like
289111d9eac1a9aa35f4f63dc7b68a0a
. Just prefix that withmd5$$
which would give youmd5$$289111d9eac1a9aa35f4f63dc7b68a0a
.0
Answers
This isn't something we currently support without modifying the code. If you want a straight md5 hash I just recommend you use the django hash method. You need to augment your password hashes a little bit.
Let's say your md5 is something like
289111d9eac1a9aa35f4f63dc7b68a0a
. Just prefix that withmd5$$
which would give youmd5$$289111d9eac1a9aa35f4f63dc7b68a0a
.Your django solution worked! Thanks a lot!