0

I want to return my original string from MD5, which is stored in database.

Here I have stored the password, it is- dipti and encrypted as 95e62d2c1c1cdab7efda7d2cdb64cf85

$password = md5($this->input->post('password'));

Now I want to show the original string as dipti.

Sebastian Hofmann
  • 1,440
  • 6
  • 15
  • 21
dipu
  • 11
  • 1
  • 6
  • 3
    before encrypting store original in the new field, bcoz it is not possible to decrypt from md5 – Pathik Vejani Nov 28 '17 at 06:26
  • 1
    Read this - https://stackoverflow.com/a/2717958/1929665 – Rohit Gautam Nov 28 '17 at 06:30
  • 1
    Possible duplicate of [How can it be impossible to "decrypt" an MD5 hash?](https://stackoverflow.com/questions/2717950/how-can-it-be-impossible-to-decrypt-an-md5-hash) – c69 Nov 28 '17 at 06:33
  • 1
    Possible duplicate of [Is it possible to decrypt md5 hashes?](https://stackoverflow.com/questions/1240852/is-it-possible-to-decrypt-md5-hashes) – User123456 Nov 28 '17 at 06:40
  • md5 is a hashing technique and it is irreversible – Anandhu Nadesh Nov 28 '17 at 06:54
  • You fail to understand why it's important that you can't extract a password from a hash. It's an unsafe action, and MD5 for passwords is also unsafe. Please see the PHP documentation for password_hash http://php.net/manual/en/function.password-hash.php – Brian Gottier Nov 28 '17 at 07:22

1 Answers1

0

MD5 is a hashing technique. You cannot decrypt it. You can compare the MD5 value with the another MD5 value to check matches (mostly in the case of password verification...)

The following site try to make the value from the MD5 value to original text http://www.md5online.org/md5-decrypt.html

Akhil J
  • 59
  • 9
  • How can you say `You cannot decrypt it` and then say `The following site decrypts the MD5 value to original text `? – Ahmed Suror Nov 10 '20 at 17:04
  • 1
    That's my bad. Updated the answer. Still, Hashes are one way - they are irreversible. MD5 hashes are also used to ensure the data integrity of files. Because the MD5 hash algorithm always produces the same output for the same given input, users can compare a hash of the source file with a newly created hash of the destination file to check that it is intact and unmodified. – Akhil J Nov 17 '20 at 06:00