-3

I want to decrypt the password by drush in drupal . is there any way for decrypt it or i have to decrypt with some command or use php code to solve it?

  • 1
    Cannot be decrypted, for security reasons you cannot decrypt passwords. – No Sssweat Sep 29 '19 at 7:19
3

Passwords cannot be decrypted, as they are not encrypted. Passwords are hashed. They are different processes.

Encryption encodes data using a key, that can later be used to decrypt the data. The encrypted data is scrambled, and can later be unscrambled.

Hashing encodes the data, but it is one way. The data cannot be unscrambled. There is no way to find out the unscrambled data.

This may seem like it makes it useless - if you cannot unscramble the data, how could it be used? Well, the hashing process, the 'scrambling' as it were, is consistent. Any given input will always give the same output every time it is used. So the password is hashed, and stored in the database. When users log in, the password they enter is hashed, and that value is compared to the hashed value stored in the database, to see if they are the same. Since the hashing process always produces the same output for a given input, if the user enters the same password they entered when creating their account, the hashed values will be equal, allowing the system to determine that the user has entered the correct password.

1

No. Its not possible to decrypt. Only possible to change passwords with:

drush user-password USERNAME --password="password"

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