Comments (3)
Is this done/called automatically in this crate
Nope, this crate specifically implements one function:
pub fn getrandom(dest: &mut [u8]) -> Result<(), Error>
and that's it. Things like SecureZeroMemory
are orthogonal to this crate, and would be be handled by a "Secure Buffer Mangement" crate like secstr
. That crate's SecVec<u8>
implements BorrowMut<[u8]>
, so it can be used with getrandom
like any u8
array or Vec<u8>
.
Both securely managing secrets in memory and generating good random bytes are tricky problems, but they are different problems. Keeping them in separate crates seems to be the best bet.
And CryptGenRandom is deprecated. I already read the issue thread about why you don't want to use BCryptGenRandom rn because it doesn't support Windows XP, but I honestly think the change should be made soon. BCryptGenRandom works on minimum of Windows Vista.
I think discussion around this are best handled in #65 (so that everyone involved will see it).
from getrandom.
Regarding deprecation of RtlGenRandom
see this message. There is a proposal to use getrandom
inside std
, so as long as Windows XP (and preferably Vista) support is not officially dropped by Rust, we have to stay conservative.
I think we can close this issue in favor of #65?
from getrandom.
Yes, I'll close the issue and any further discussion can be done on #65
from getrandom.
Related Issues (20)
- man7 link should be replaced
- The newly updated version "0.2.13" cannot run on mipsel HOT 7
- Error: target is not supported (cargo build-bpf) HOT 2
- Remove fallback logic for FreeBSD
- Investigate removing fallback logic for Solaris/Illumos HOT 1
- Windows: Switch to using ProcessPRNG by default. HOT 31
- `libc` `v0.2.154` yanked HOT 2
- Support `x86_64-unknown-linux-none` HOT 32
- Implementation of `dlsym`-based `Weak` is not sandbox-friendly HOT 6
- Use VM to run tests
- Release 0.3? HOT 8
- Document and Test that `getrandom()` never panics. HOT 3
- Feature handing changes HOT 2
- API Changes HOT 6
- Run `cargo clippy` in CI for all targets
- Potential improvements to use of `/dev/random` on Linux/Android HOT 5
- use_file: Just use `libstd` on targets that we know have libstd, instead of pthreads + libc. HOT 20
- Deprecate and remove `getrandom_uninit` HOT 7
- Deprecate and remove `impl From<NonZeroU32> for Error`. HOT 1
- Crate libc 0.2.154 is yanked HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from getrandom.