diff --git a/kem/src/lib.rs b/kem/src/lib.rs index 5c7e8923e..45a693e6f 100644 --- a/kem/src/lib.rs +++ b/kem/src/lib.rs @@ -10,7 +10,7 @@ #![warn(missing_docs, unused_qualifications, missing_debug_implementations)] use core::fmt::Debug; -use rand_core::CryptoRng; +use rand_core::TryCryptoRng; /// A value that can be encapsulated to. Often, this will just be a public key. However, it can /// also be a bundle of public keys, or it can include a sender's private key for authenticated @@ -20,7 +20,7 @@ pub trait Encapsulate { type Error: Debug; /// Encapsulates a fresh shared secret - fn encapsulate(&self, rng: &mut R) -> Result<(EK, SS), Self::Error>; + fn encapsulate(&self, rng: &mut R) -> Result<(EK, SS), Self::Error>; } /// A value that can be used to decapsulate an encapsulated key.