Alternative Entropy Sources

前端 未结 15 831
情书的邮戳
情书的邮戳 2020-12-11 02:12

Okay, I guess this is entirely subjective and whatnot, but I was thinking about entropy sources for random number generators. It goes that most generators are seeded with th

15条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-11 02:28

    How about spinning off a thread that will manipulate some variable in a tight loop for a fixed amount of time before it is killed. What you end up with will depend on the processor speed, system load, etc... Very hokey, but better than just srand(time(NULL))...

提交回复
热议问题