Laravel#39;s application key - what it is and how does it work?(Laravel 的应用程序密钥 - 它是什么以及它是如何工作的?)
问题描述
据我所知,Laravel 中的应用密钥为会话和敏感数据提供了保护,但我想了解的是它究竟是如何工作的?它的目的是什么?我找不到任何有关它的信息.
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 of it? I couldn't find any information about it.
推荐答案
APP_KEY 用于加密,而不是散列.您在应用程序中加密的每个数据都在幕后使用 APP_KEY.请记住,加密数据可以解密,但散列数据无法解密.
APP_KEY is used for encryption and not hashing. Every Data you encrypt in your application is using APP_KEY behind the scene. Do remember that encrypted data can be decrypted but hashed data cannot be decrypted.
APP_KEY 的一个常见误解是它与密码哈希有关,但事实并非如此.这是证据.
A common misconception of APP_KEY is that it is related to Password hashing, the truth is it's not. and here is the proof.
泰勒的推文
在上面的推文中可以看到APP_KEY与HASHED数据无关
You can see in the above tweet that APP_KEY has nothing to do with HASHED data
这篇关于Laravel 的应用程序密钥 - 它是什么以及它是如何工作的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Laravel 的应用程序密钥 - 它是什么以及它是如何工作的?
基础教程推荐
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何替换eregi() 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
