为了保证随机数生成器的诚实,我们的想法是,如果用户愿意,可以验证该数字实际上是从公共(public)熵源生成的。这使系统能够向用户确保服务器无法选择随机数。$entropy="what_do_you_think";$md5=md5($entropy);/*takethefirst10hexcharactersofthemd5hash*/$hex=substr($md5,0,9);/*convertthehextodecimal*/$dec=hexdec($hex);/*usethisdecimalasaseed*/srand($dec);/*pickarandomnumberbetwe