Pages

Showing posts with label password generation. Show all posts
Showing posts with label password generation. Show all posts

Monday, March 21, 2011

Joomla Password generation

Use the below code for generating joomla password.

        $new_password = "Your password";
       $salt = JUserHelper::genRandomPassword(32);
$crypt = JUserHelper::getCryptedPassword($new_password, $salt);
        $password = $crypt.':'.$salt;

I hope it will help you.. 

Monday, March 7, 2011

Generate Moodle password

For generating a moodle password , first of all include the the configuration page then use the script given below
$password = “new password”;
$moodle_password = md5($password.$CFG->passwordsaltmain);
$password is the actual password and the passwordsaltmain is a hash key generated at moodle installation.