我正在研究后端编程,特别是 Node.js 和 ExpressJS,目前让我感到困惑的是 the "keys" prop cookie-session 库对我们有帮助吗?它有什么意义呢?已经阅读了很多与身份验证、 session 等相关的不同 Material ,但这个特定问题的答案对我来说仍然模棱两可。
有人可以给我一个关于这个主题的深入解释吗?最好是两种方式:用简单的术语和使用编程词典?
最佳答案
简单地解释一下:
it's essentially using different keys (rotating the keys) every certain time period to encrypt the data; so that the data breach from one key can be contained/limited; or let's say a key can be cracked in
x
months, then rotating the key - using a different key everyx-1
months to reduce the probability of data being compromised.
这个问题实际上属于加密堆栈交换,有点难以描述,并且超出了文档的范围。除非您专门搜索 key 轮换的方法/算法,否则搜索也不会返回任何准确的结果。
访问这些内容以获得一些概念概述和深入的示例:
这些是更深入的技术和数学引用:
关于node.js - ExpressJS 的cookie-session 库的keys 属性有什么意义?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47968751/