M
M
Mariik2014-03-28 09:50:02
PHP
Mariik, 2014-03-28 09:50:02

How to encrypt passwords in Joomla 2.5?

Good afternoon.
I need to import users from a site on Joomla to a site on another CMS. So I tried to generate a hash to validate the password. Joomla classes will not be available to me.
I need to generate a hash from a user-supplied password to compare it with the stored value in a table imported from the Joomla database.
Original Joomla hash for "testing" password "
e8ce06fa84d2e58835c810ae0a3a9fbe:96hminU8FnGYxzL52..."
Here is my attempt to generate a hash for testing

<?php
    $joomla_pass = 'e8ce06fa84d2e58835c810ae0a3a9fbe:96hminU8FnGYxzL52...'; // "testing"
  $hashparts =  explode(':' , $joomla_pass);
  $userpassword = "testing";
  $userhash = md5($userpassword.$hashparts[1]);
  print ("UserHash -").$userhash;

?>

But the hash stubbornly does not match the one generated by Joomla.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GreatRash, 2015-08-04
@kemply

Did the audio load by this time? It is probably worth doing all this only when the loadedmetadata event occurs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question