Skip to content

RNGCryptoServiceProvider() is obsolete #10329

@BitBucket3

Description

@BitBucket3

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

Metadata

Metadata

Assignees

Labels

Pri3Indicates issues/PRs that are low priorityarea-System.SecurityIssues related to security practices for .NET developers.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions