How can i decode hash value in laravel 5? How can i decode hash value in laravel 5? laravel laravel

How can i decode hash value in laravel 5?


Use Crypt::decrypt()

$value = Crypt::decrypt($encrypted);

Note : You must decrypt the value with the same key used to encrypt it.

Laravel's encryption routines use Config::get('app.key') for encryption. This happens internally. Since this value is different for every Laravel application then the application that encrypts a value must also decrypt the value.

Or ...

The application must call Crypt::setKey() prior to decrypting to match the key to the value used for encrypting. See Setting the Encryption Key.

To Encryption use

Crypt::setKey($key);

This key will be used for subsequent Crypt::encrypt() and Crypt::decrypt() calls.