Skip to content

Conversation

SiyuanSun0736
Copy link
Contributor

Use LCG pseudo-random number generator to generate a urandom device

@SiyuanSun0736
Copy link
Contributor Author

I've updated the constructor to take a seed, and the Default trait now creates instances with a predefined default seed.


impl UrandomDev {
/// Create a new instance of the urandom device.
pub fn new(seed: u64) -> Self {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make it const fn

@equation314 equation314 merged commit 1551303 into arceos-org:main Jun 28, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants