`PHP.ini` 中的 `session.entropy_length` 有什么作用? [英] What does `session.entropy_length` in `PHP.ini` do?

查看:77
本文介绍了`PHP.ini` 中的 `session.entropy_length` 有什么作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PHP.ini 的 session 部分有一个指令叫做 session.entropy_length.

In the session section of PHP.ini there is a directive called session.entropy_length.

我知道它用于使 session id 的生成更加随机.

I'm aware that it's used to make the generation of the session id more random.

它是如何做到的?

最大长度是多少?

如果它超过了正在使用的 hash 位怎么办?

What if it's exceeding the bits of the hash in use?

推荐答案

session.entropy_length 指定将从上面指定的文件中读取的字节数.默认为 0(禁用).

session.entropy_length specifies the number of bytes which will be read from the file specified above. Defaults to 0 (disabled).

PHP 手册

上面提到的文件"是 session.entropy_file

The "file mentioned above" is session.entropy_file

会话的熵"与会话 id 值的随机性有关

'entropy' for sessions is related to the randomness of session id values

这篇关于`PHP.ini` 中的 `session.entropy_length` 有什么作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆