title: What is Joomla 2.5 Password Encryption method?
body: <p>I'm developing a web site using Joomla 2.5. I have Included another sample site for the above parent site. from this child site I'm gonna add new users to the database. but these two sites are uses different method to password encryption.</p>
  
  <p>I found something on web as Joomla encryption but it seems to be not working.</p>
  
  <pre><code>function genRandomPassword($length=32) 
  {
  $salt       = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
  $makepass   = '';
  mt_srand(10000000*(double)microtime());
  for ($i = 0; $i &lt; $length; $i++)
      $makepass .= $salt[mt_rand(0,61)];
  return $makepass;
  }
  
      if ( strlen($_POST['pwd']) &gt; 100 )
      {
          $_POST['pwd'] = substr( $_POST['pwd'], 0, 100 );
      }
  
      $salt = genRandomPassword();
      $pass= md5(stripslashes($_POST['pwd']).$salt) .':'.$salt;
  </code></pre>
  
  <p>Isn't this the method or where am I doing wrong?</p>
  
  <p>Thank you</p>