RNGCryptoServiceProvider is obsolete. To generate a random number, use one of the RandomNumberGenerator static methods instead.
Since this part of the documentation is related to cryptographic code, an effort should be made to keep the examples in the documentation up-to-date, since many developers might just copy and paste these code snippets.
The obsoletion warning for RNGCryptoServiceProvider only applies to .NET, so I am not sure if this would also affect the .NET framework / standard documentation as well.
The example code for the
Rfc2898DeriveBytes
class uses theRNGCryptoServiceProvider
for creating random bytes, but the documentation also states thatSince this part of the documentation is related to cryptographic code, an effort should be made to keep the examples in the documentation up-to-date, since many developers might just copy and paste these code snippets.
The obsoletion warning for
RNGCryptoServiceProvider
only applies to .NET, so I am not sure if this would also affect the .NET framework / standard documentation as well.