i need the key that will be used for subsequent Crypt::encrypt()
and Crypt::decrypt()
calls but only in the current request.
Crypt::setKey('1');
$pin_code = Crypt::encrypt($pin_codes[$key]);
// it do the encryption and then automatically log out
what could be the issue?
I figured it out
There's only three places Laravel uses the Crypt package.
Because of point no 2 ... we will be logged out of the system
so better to reset key to original
Crypt::setKey('1');
$pin_code = Crypt::encrypt($pin_codes[$key]);
Crypt::setKey(Config::get('app.key'));//reset to original after job is done