From baf6f108b94f7e7b3a2ec12396e9bfbbd67c76ee Mon Sep 17 00:00:00 2001 From: Igor Matuszewski Date: Thu, 9 Apr 2020 23:21:10 +0200 Subject: openpgp: Move random generation to Nettle backend --- openpgp/src/crypto/mod.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'openpgp/src/crypto/mod.rs') diff --git a/openpgp/src/crypto/mod.rs b/openpgp/src/crypto/mod.rs index 8d2e04fd..37285c63 100644 --- a/openpgp/src/crypto/mod.rs +++ b/openpgp/src/crypto/mod.rs @@ -5,7 +5,6 @@ use std::ops::{Deref, DerefMut}; use std::fmt; use buffered_reader::BufferedReader; -use nettle::random::{Random, Yarrow}; use crate::types::HashAlgorithm; use crate::Result; @@ -14,6 +13,7 @@ pub(crate) mod aead; mod asymmetric; pub use self::asymmetric::{Signer, Decryptor, KeyPair}; mod backend; +pub use backend::random; pub(crate) mod ecdh; pub mod hash; mod keygrip; @@ -25,11 +25,6 @@ pub use s2k::S2K; pub mod sexp; pub(crate) mod symmetric; -/// Fills the given buffer with random data. -pub fn random>(mut buf: B) { - Yarrow::default().random(buf.as_mut()); -} - /// Holds a session key. /// /// The session key is cleared when dropped. -- cgit v1.2.3