diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-07-02 19:00:41 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-07-02 19:02:15 +0200 |
commit | d887f79b62c86cf7a29ecc206c5755ff56879713 (patch) | |
tree | 8aa6fa341722b0e4ee4f38d2f4fd7a7fc46abca8 /openpgp/src/crypto/s2k.rs | |
parent | 92371c26e33119d2ea162d9a8bfdabe45f9400ec (diff) |
openpgp: New function crypto::random.
- Add and use a function that fills a buffer with a thread-local
random number generator.
Diffstat (limited to 'openpgp/src/crypto/s2k.rs')
-rw-r--r-- | openpgp/src/crypto/s2k.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/openpgp/src/crypto/s2k.rs b/openpgp/src/crypto/s2k.rs index b3e099e2..b2b95f68 100644 --- a/openpgp/src/crypto/s2k.rs +++ b/openpgp/src/crypto/s2k.rs @@ -14,7 +14,6 @@ use crypto::SessionKey; use std::fmt; -use nettle::{Yarrow, Random}; use quickcheck::{Arbitrary, Gen}; use rand::Rng; @@ -57,7 +56,7 @@ pub enum S2K { impl Default for S2K { fn default() -> Self { let mut salt = [0u8; 8]; - Yarrow::default().random(&mut salt); + ::crypto::random(&mut salt); S2K::Iterated { // SHA2-256, being optimized for implementations on // architectures with a word size of 32 bit, has a more |