dotnet-api-docs icon indicating copy to clipboard operation
dotnet-api-docs copied to clipboard

RNGCryptoServiceProvider() is obsolete

Open BitBucket3 opened this issue 1 year ago • 2 comments

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

BitBucket3 avatar Aug 28 '24 12:08 BitBucket3

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.

vcsjones avatar Aug 28 '24 13:08 vcsjones