-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking Issue for secure random data generation in std #130703
Copy link
Copy link
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for Tracking Issue.
View all comments
Feature gate:
#![feature(random)]This is a tracking issue for secure random data generation support in
std.Central to this feature is the
RandomSourcetrait insidecore::random, which generates random bytes.stdalso exposes the platform's secure random number generator via theDefaultRandomSourcetype. There is aDistribution<T>trait for distributions that cansamplerandom values of a specific type, and arandomfunction for convenience to allow things likerandom(1..=6).Public API
Steps / History
randomfeature (alternative version) #129201Distribution<T>and newrandomUnresolved Questions
gen_bytesandDefaultRng, the implementation PR usesfill_bytesandDefaultRandomSource(see arguments progen_bytesand profill_bytes)Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩