diff options
author | Igor Matuszewski <igor@sequoia-pgp.org> | 2020-04-09 23:21:10 +0200 |
---|---|---|
committer | Igor Matuszewski <igor@sequoia-pgp.org> | 2020-06-22 11:57:06 +0200 |
commit | baf6f108b94f7e7b3a2ec12396e9bfbbd67c76ee (patch) | |
tree | ef4890496b85a9452281cea46564764c31a33ad4 /openpgp/src/crypto/mod.rs | |
parent | 35a57dbb7f5e94b8b2f6d70643b6718a81cfc21e (diff) |
openpgp: Move random generation to Nettle backend
Diffstat (limited to 'openpgp/src/crypto/mod.rs')
-rw-r--r-- | openpgp/src/crypto/mod.rs | 7 |
1 files changed, 1 insertions, 6 deletions
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<B: AsMut<[u8]>>(mut buf: B) { - Yarrow::default().random(buf.as_mut()); -} - /// Holds a session key. /// /// The session key is cleared when dropped. |