Closed tomleavy closed 1 year ago
Although, given that this crate already depends on rand_core
, wouldn't there be more useful to have an additional feature flag, say getrandom
, that just enables OsRng
on rand_core
, and then if this flag is set, to provide a wrapper say new_from_os_rng
that just uses new(rand_core::OsRng)
.
The current crate has a great API that makes it hard for misuse, and key generation should fall into this category.
I think a getrandom
feature flag that activates rand_core/getrandom
is a good idea.
A convenience method for generating a key using OsRng
is a good idea as well.
There are issues with conflicting versions of
rand_core
since x25519 does not use the latest version. It would be helpful ifrand_core
was exported to avoid conflicts