I am still new on laravel, and just use laravel package name Crypt
but I found some that there are
Crypt::encrypt
and
Crypt::encryptString
what is the difference between them?
You can always refer to source code to know.
See Line 122 of Encrypter.php:
return $this->encrypt($value, false);
Behind the scenes the encryptString calls the encrypt() method with false as second parameter, meaning that it won't serialize the value you give.
There's no difference in the behavior, but it will encrypt faster and the result will be slightly smaller because it won't contain string serialization.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With