根据随机(4)手册页,
read from the /dev/urandom device will not block
Run Code Online (Sandbox Code Playgroud)
如果你想阻止它,你应该从/dev/random(没有任何u)读取很多字节.(有多少是硬件和系统相关的).
所以你不能"exaust" /dev/urandom,因为
Run Code Online (Sandbox Code Playgroud)A read from the /dev/urandom device will not block waiting for more entropy. As a result, if there is not sufficient entropy in the entropy pool, the returned values are theoretically vulnerable to a cryptographic attack on the algorithms used by the driver.
我相信你应该/dev/random通过阻止使用哪些确实可以用尽.但是你不应该从它读取超过256位.
| 归档时间: |
|
| 查看次数: |
1472 次 |
| 最近记录: |