What does `session.entropy_length` in `PHP.ini` do?

陌路散爱 提交于 2019-12-07 00:43:24

问题


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

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

How does it do that?

What is the maximum length?

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


回答1:


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

PHP Manual

The "file mentioned above" is session.entropy_file

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



来源:https://stackoverflow.com/questions/34966472/what-does-session-entropy-length-in-php-ini-do

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!