Skip to content

Instantly share code, notes, and snippets.

@sergiois
Last active December 22, 2015 04:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergiois/6416231 to your computer and use it in GitHub Desktop.
Save sergiois/6416231 to your computer and use it in GitHub Desktop.
Función que permite generar una contraseña tal cual la crea el Core de Joomla!
<?php
function joomlaPassword($password) {
$password= base64_decode($password);
$salt = md5(mt_rand());
$encrypt = md5($password . $salt);
return $encrypt . ':' . $salt;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment