This pull request implements the required randombytes() function in pure Rust using the rand::OsRng crate. This should work on any Rust-compatible platform.
A couple unanswered questions remain:
Is it really necessary to create a new instance of OsRng with every function invocation, or is there a way to create a single global/protected static instance that can just be re-used over the lifetime of the program.
Where is the right place for randombytes()? It's currently in its own file, but this (maybe?) should change.
I'm fine with leaving these questions as future work for now, though.
This pull request implements the required
randombytes()
function in pure Rust using therand::OsRng
crate. This should work on any Rust-compatible platform.A couple unanswered questions remain:
OsRng
with every function invocation, or is there a way to create a single global/protected static instance that can just be re-used over the lifetime of the program.randombytes()
? It's currently in its own file, but this (maybe?) should change.I'm fine with leaving these questions as future work for now, though.