The abstract System.Security.Cryptography.RandomNumberGenerator class and its specific implementations do not expose the method for setting the seed to the developer (although internally I suspect that they really use it.)
The rationale for the design was, I suspect, that repeatability does not create a “cryptographically strong” stream of random values.
If you look at a specific implementation, RNGCryptoServiceProvider , while it exposes a constructor that takes byte[] to presumably initialize PRNG, its documentation says
This value is ignored.
And in the comments it says:
This method does not directly initialize the RNGCryptoServiceProvider class. Calling this method is equivalent to calling the RNGCryptoServiceProvider constructor and passing null .
For information about what is used in the seed used, see the MSDN documentation for CryptGenRandom
source share