dotnet / dotnet/dotnet-api-docs
Add security warning to System.Random documentation
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
### Type of issue
Missing information
### Description
System.Random is not designed for cryptographic use, but that is not clearly noted on the core documentation page for the class, as referenced. I recommend adding a notification div near the top of the page noting this fact. Perhaps:
**Security Notification**
_System.Random is not for cryptographic use. For cryptographically sound random numbers for used in seeds for key creation, as an example, please see System.Security.Cryptography.Random()_
This is not unlike what was on Binary Formatter for years before Barry finally took it to pasture.
### Page URL
https://learn.microsoft.com/en-us/dotnet/api/system.random?view=net-9.0
### Content source URL
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System/Random.xml
### Document Version Independent Id
ea32dd59-b49e-473d-c696-273ca85c30ef
### Platform Id
50cb73a0-8e80-a3ce-60b1-757c81dbcee3
### Article author
@dotnet-bot
Contributor guide
Assessment
This issue has not been assessed yet.