RNGCryptoServiceProvider() is obsolete
Type of issue
Code doesn't work
Description
Example:
Dim random() As Byte = New Byte(100) {}
'RNGCryptoServiceProvider is an implementation of an RNG
Dim rng As New RNGCryptoServiceProvider()
rng.GetBytes(random) ' bytes in random are now random
Page URL
https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.randomnumbergenerator.getbytes?view=net-7.0
Content source URL
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Security.Cryptography/RandomNumberGenerator.xml
Document Version Independent Id
1bda3c6e-24e8-fb87-53af-851346949446
Article author
@dotnet-bot
Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones
I can fix up the example to use not-obsolete APIs.
Thanks for bringing attention to it.