0

The RandomNumberGenerator class does not take a seed value but the Random class does.

As far as I understand, the Random class is not considered a good choice for producing entropy for security.

I need to pass in the same seed material and always get the same sequence of random numbers returned.

How can I do that in .NET 6.0?

Luke Puplett
  • 42,091
  • 47
  • 181
  • 266
  • 1
    Part of the appeal of cryptographically strong random values is that it's very hard to find out the starting seed. Part of why `Random` is weak for security is because it has a predictable seed. – gunr2171 Nov 16 '22 at 18:20
  • Is the dupe target satisfactory? If you only really need reproducibility for testing then it should be. – President James K. Polk Nov 16 '22 at 19:17

0 Answers0