I am developing an android app using android studio for my wordpress website, i want to add user to my database, i am having trouble for user password, as you know wordpress hashes the passwords, i searched a lot but could'nt find how to write the codes for password in android studio, would you please give me references and resources how i can do this. i think i don't know what i need to search. help me please!!!

PS: I have no problem of adding user_login or user_email or... to the users table on data base (php myadmin) but i don't know how to send the password. I know i have to hash it before sending, but i don't know the way...

share|improve this question
2  
You should perhaps look into using the API or a plugin which offers an API to the core, for example developer.wordpress.org/rest-api/reference/users/#create-a-u‌​ser – Lawrence Cherone Dec 23 at 3:32

You have to remove the wp_hash_password() from your wordpress source code so that it will not encrypt the passwords. like this

php $hash = wp_hash_password( $password ) --> php $hash = $password;

here $password is the simple string so u can read it easily or use as per requirement.

Or you can study the Encryption technique so you will able to code a decryption one.
Wordpress use a 1 way encryption to store the passwords using a variation of md5. There is no way to reverse this.

See this article for more info http://wordpress.org/support/topic/how-is-the-user-password-encrypted-wp_hash_password

You Should use above code in your wordpress code.

share|improve this answer
    
Oh for crying out loud, no. That is nowhere near being safe. It's time to get into and learn from the 21st century hashing methods, one such as password_hash(). – Funk Forty Niner Dec 23 at 3:39
    
"Wordpress use a 1 way encryption to store the passwords using a variation of md5. There is no way to reverse this." - I take it that you've never heard of what Rainbow tables are, have you? – Funk Forty Niner Dec 23 at 3:40
    
Linking to a 7 years, 3 month old post wont be relevant in the latest versions. – Lawrence Cherone Dec 23 at 3:40
    
thank you so much for helping gagan, but that is not the way, i am sure i have to hash the password from the the app and send it, i saw by my self someone did this before and i know that is the way, but i cant reach him out now to ask hoe did you do this. i know it has a standard way, i remember he told me it is easy and wordpress gives you a method (or function) to hash the password before sending.... but i dont know how to find it...Thanks for your helping firend – Arsalan Zahedi Rad Dec 23 at 9:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.