0

I am storing data into my database using MD5 and salt togethser for the hashing as shown below.

Controller

var salt = '112091318*32#'

$user_details = array ('password' => md5(crypt($this->input->post('pass'),$this->salt));

This provides a hash like cf0c249ed76753e679bd17804c4739299

Now my question is, is there a way that i can decrypt the hash back to normal text since , i have the salt ? If so, how ?

NB: I am new to how salt & MD5 works together. Please assist

  • 3
    You can't. The point of hashing is that it is irreversible. – Jerodev Aug 27 '19 at 14:40
  • 1
    You might want to alternatively look into [How to use password_hash](https://stackoverflow.com/questions/30279321/how-to-use-password-hash) – Nigel Ren Aug 27 '19 at 14:41
  • Not even might, you should definitely alternatively look at the above. – Jonnix Aug 27 '19 at 14:41
  • @NigelRen, password_hash can be reversed ? – stackauth stackauth Aug 27 '19 at 14:44
  • 1
    [Hashing](https://laravel.com/docs/5.8/hashing) is not [encryption](https://laravel.com/docs/5.8/encryption) the second is reversible the first is not.https://stackoverflow.com/questions/4948322/fundamental-difference-between-hashing-and-encryption-algorithms – dparoli Aug 27 '19 at 14:49
  • 4
    You don't want passwords to be reversed. Ever. – Dave Aug 27 '19 at 14:52

0 Answers0