Hello to you,
For the purpose of connecting to an external application to my site in wordpress, I need to get the word pass my users encoded MD5 and not PHPASS WordPress.
After various searches without results, I would like to know if any of you have already been able to recover a password in MD5 since WordPress is spent in PHPASS HASH?
The tracks I've found are:
http://stackoverflow.com/questions/4750 ... 5-password
http://wordpress.org/support/topic/plug ... ass-to-md5
http://stackoverflow.com/questions/1080 ... n-meta-val
After various tests, I finally get a result but the pass word does not match:
<?php
function encrypt_for_wordpress($plain_text_password) {
return md5("\$P\$B" . $plain_text_password);
}
$user_info = get_userdata(1);
// echo 'Username: ' . $user_info->user_login . "\n";
// echo 'User level: ' . $user_info->user_level . "\n";
// echo 'User ID: ' . $user_info->ID . "\n";
echo 'User P: ' . $user_info->user_pass . "\n";
$c2s_user_password = $user_info->user_pass;
$c2s_md5_user_password = encrypt_for_wordpress($c2s_user_password);
echo "md5 P : " . encrypt_for_wordpress($c2s_user_password). "\n";
$c2s_pass='testpassword'; echo(md5($c2s_pass));
echo ('</br> ------- </br>');
?>
Passwords encrypted pass obtained are:
phpass P: $ P $ Bv4iaLxehqIgbdpbXfjFgG/kcyBwqP /
md5 P: 7d8cd560a47f60fb32e66a71f50c26d9
While the pass md5 should be
5ced724eb662a20d198d04c0d90cba4d
Do you have any idea?
Thanks you very much !