I just want to know which algorithm does Moodle uses to encrypt passwords? So that, I can authenticate Moodle users on my login application.
i m using moodle 2.4
it used to use md5 on the database table and there is a salt in config.php.
What you are attempting is not a good approach, you should look at writing your own authentication plugin for moodle. This may give you a starting point:
https://moodle.org/plugins/view.php?plugin=auth_onelogin_saml
Hi Alisha,
Given that you are using Moodle 2.4, it would be MD5 hash (not encryption) algorithm.
Basically you need something like this:
MD5( userpassword + salt )
Where the salt is taken from the $CFG->passwordsaltmain parameter at the config.php file (in the moodle installation directory).
The following should be of help:
https://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html#function_md5
http://php.net/manual/en/function.md5.php
http://docs.moodle.org/24/en/Password_salting