Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RngCore trait is implemented #1122

Merged
merged 2 commits into from
Jan 29, 2024
Merged

Conversation

playfulFence
Copy link
Contributor

While working on this task it turned out that we do not provide true randomness of generated numbers yet (our generator is not TRNG yet), which does not allow us to implement CryptoRng marker trait for our structure yet. The #1120 was created due to that.
For now I left the TODO instead of implementing CryptoRng. When #1120 will be closed, we'll replace TODO with implementation of a marker trait.
Also not sure if this PR should close the initial #942, to be discussed.

made randomness ensuring function
implemented RngCore trait (final version i guess)
@jessebraham
Copy link
Member

(Sorry, attached the wrong issue by mistake)

Copy link
Contributor

@bjoernQ bjoernQ left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@JurajSadel JurajSadel left a comment

Choose a reason for hiding this comment

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

LGTM, thank you! I can see a warning:

warning: unused import: `Error`
  --> /home/runner/work/esp-hal/esp-hal/esp-hal-common/src/rng.rs:68:17
   |
68 | use rand_core::{Error, RngCore};
   |                 ^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

Again, we have a bunch of others as well but it would be nice to try to avoid introducing new ones :D

Changelog entry

Get rid of warning
@playfulFence
Copy link
Contributor Author

@JurajSadel
Sorry, didn't notice this warning, fixed, thanks!

Copy link
Contributor

@JurajSadel JurajSadel left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

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

Thanks!

@jessebraham jessebraham added this pull request to the merge queue Jan 29, 2024
Merged via the queue into esp-rs:main with commit be7b461 Jan 29, 2024
17 checks passed
playfulFence added a commit to playfulFence/esp-hal that referenced this pull request Jan 30, 2024
* WIP

made randomness ensuring function
implemented RngCore trait (final version i guess)

* Revert part of changes and leave TODO comment

Changelog entry

Get rid of warning
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.

4 participants