How reliable is the Random function in Delphi

前端 未结 9 1371
遥遥无期
遥遥无期 2020-12-30 06:53

I am writing a program which write statistical tests in Delphi (must be Delphi) and I\'ve heard that the Random functionality is somewhat odd. You have to call randomize to

9条回答
  •  悲哀的现实
    2020-12-30 07:12

    Just to add to the pool of possibilities - Windows offers a range of built-in Cryptography functions. There probably is a Delphi wrapper for them as well, if it's not already included by default.

    Among these functions is also a cryptographically strong random number generator. This is by far the best randomness you will get in software, because it seeds itself based on a very long list of factors. I'm not sure, but I suspect it will even use a hardware random number generator if you have one.

    And if that's not enough, you can also try to sign up at the Quantum Random Bit Generator Service for some REALLY random values.

提交回复
热议问题