diff --git a/crypto-common/src/lib.rs b/crypto-common/src/lib.rs index 164db413f..0a1cedfaa 100644 --- a/crypto-common/src/lib.rs +++ b/crypto-common/src/lib.rs @@ -20,7 +20,7 @@ pub use hybrid_array as array; pub use hybrid_array::typenum; #[cfg(feature = "getrandom")] -pub use getrandom; +pub use getrandom::{self, SysRng}; #[cfg(feature = "rand_core")] pub use {generate::Generate, rand_core}; @@ -33,6 +33,10 @@ use hybrid_array::{ #[cfg(feature = "rand_core")] use rand_core::CryptoRng; +/// [`CryptoRng`] interface for the system's preferred random number source that panics on error. +#[cfg(feature = "getrandom")] +pub type UnwrapSysRng = rand_core::UnwrapErr; + /// Block on which [`BlockSizeUser`] implementors operate. pub type Block = Array::BlockSize>;