Laravel's application key - what it is and how does it work?

后端 未结 6 676
无人共我
无人共我 2020-12-10 10:29

From what I know, the app key in Laravel provides protection for session and sensitive data, but what I want to understand is how exactly does it work? What is the purpose o

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-10 11:23

    The comment here says it's used in the ecrypter. I found it here and here used with openssl_encrypt and openssl_decrypt. Without that key you cannot decrypt anything encrypted with those two functions, like sessions cookies stored on the user computer. If they weren't encrypt anyone with access to them could log in to the application as you.

提交回复
热议问题