Fastest implementation of a true random number generator in C#

前端 未结 8 1231
隐瞒了意图╮
隐瞒了意图╮ 2020-12-08 23:23

I was reading about Random.Next() that for \"cryptographically secure random number suitable for creating a random password\" MSDN suggests RNGCryptoServiceProvider Class

8条回答
  •  盖世英雄少女心
    2020-12-09 00:02

    The only known way to get truly random numbers in hardware is slow; if you try to speed it up your hair turns white, falls out in clumps, and the NRC sends robots in to clean up your server room.

    I'm with Mehrdad on this one: don't try to roll your own.

提交回复
热议问题