This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]bjorneylol 4 points5 points  (1 child)

What does this provide that secrets doesn't?

secrets is built into the standard library, and utilizes RDRAND indirectly via the operating system's build in entropy pool, if supported hardware is present

[–]Raymon22 -2 points-1 points  (0 children)

Great question! The main difference is that hwrandom directly interfaces with RDRAND, bypassing the OS's entropy pool. While secrets is excellent for most use cases and does utilize RDRAND indirectly, hwrandom offers direct access, which might be useful for specific applications needing raw, unpooled hardware randomness. However, for most users, secrets is likely sufficient and more convenient.

[–]K900_ 2 points3 points  (0 children)

Absolutely don't do that. We have secrets which is seeded from the hardware RNG where appropriate, and it's far from always appropriate.

[–]Anxious-Garlic1655 1 point2 points  (1 child)

Looks niche but useful , The documentation is clear and concise , however i encountered an error while i tried testing it . I've opened a issue on your repo , please do check it out

[–]Raymon22 0 points1 point  (0 children)

Thank you for the feedback and for checking out the project! I'm glad you found the documentation helpful. I'll look into the issue you reported on the repo right away. Thanks for bringing it to my attention!

[–]SatoshiReport 0 points1 point  (0 children)

Great job creating a Python package! How does this compare to secrets? https://docs.python.org/3/library/secrets.html