Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By ashish.verma85 on
i want to convert hashed database password converted to simple text.
in database we have like that
$S$D/gNAQpXH4cApq3D25NBt/1BC/YSo/rt9LOxbfN1nfW3L0gRAUfL
$S$DyNYW0j8GmBLYCVFMGhhV2FCnM9RTPfHwtgpNpuRdknbJkGNZuOu
$S$Difag.rmYtALcHcG3au2rjnl01baasgvc2/iy5pATTBWO/G0SP8Y
but i want to print it in page.tpl or in any block as a simple text..
i have done the encryption well.....but in decryption i need ideas to do that. please help me to fix it.
Thanks
Comments
Basically you cannot
Basically you cannot http://stackoverflow.com/questions/13621391/how-can-i-decrypt-sha-512-ha...
though it is said these password hashes will give way to brute force attack sometimes.
Drupal is designed to be secure.
Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors
Hi john i read this. So what
Hi john i read this.
So what is the best way to authenticate or check database username and password from outside drupa,
means from a PHP page.
I am writing a code in php page, where i have a password variable already encrypted to sha512 and username.
Now i want to validate that with drupal users table with "name" and "pass" but it give me different hash each time so its not possible to compare password, do you have any other idea in the mind?
Thanks
Ashish
Shared signon is outside my
Shared signon is outside my expertise. There are many authentication options for different situations, and you might start by study the options listed here https://groups.drupal.org/node/182004
Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors
John thanks again, We don't
John thanks again,
We don't need SSO here, we only need to send the data back to the third party site, like, success or fail....
the web service i created working fine with non hash password. it just not working with drupal7 hash pwd.
OK, do you know how can i compare two drupal 7 passwords?
ex
comparing this
$S$D/unrY4bfIXFZW2VaMC76JCr9sc2759fKCmd1zl4jvTUntRICu4p
with
$S$D/unrY4bfIXFZW2VaMC76JCr9sc2759fKCmd1zl4jvTUntRICu4p
or
rS$D/unrY4bfIXFZW2VaMC76JCr9sc2759fKCmd1zl4jvTUntRICu40
if they are equal or not?
that will solve my issue.
Thanks
Ashish
I think yes, but I never did
I think yes, but I never did it, so I guess you need to try. Maybe someone with experience of this will jump in and give better advice than I can.
Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors
Solved it.
Solved it.
Care to tell?
Care to tell?
Hashing is a one-way process.
Hashing is a one-way process. Hashed passwords cannot be converted back to unhashed passwords (this is by design).
What you have to do is hash a submitted password using the same process as Drupal, then check if the hashed password is the same as the one saved in the database.
hi
hi
Hashing is a one-way process, so what i did, i compared two passwords using drupal functions, if you need then i can share the code.
Thanks
Hi,
Hi,
Can you post the code please? I have the same problem and i am really lost.
Thank you
Hi, sorry i dont have the
Hi, sorry i dont have the access of the source code anymore, but you can easily compare it using the existing drupal functions.
Hi, Where can i find the
Hi, Where can i find the function who encrypt the password? Thanks
https://api.drupal.org/api
https://api.drupal.org/api/drupal/includes%21password.inc/function/user_...
Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors
You can refer this link
https://www.drupal.org/node/1556488 . You can reset your password.