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/symmetric.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/symmetric.rs')
-rw-r--r-- | openpgp/src/crypto/symmetric.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/openpgp/src/crypto/symmetric.rs b/openpgp/src/crypto/symmetric.rs index d2a94b15..32183163 100644 --- a/openpgp/src/crypto/symmetric.rs +++ b/openpgp/src/crypto/symmetric.rs @@ -583,8 +583,6 @@ mod tests { #[test] fn roundtrip() { use std::io::Cursor; - use nettle::{Random, Yarrow}; - let mut rng = Yarrow::default(); for algo in [SymmetricAlgorithm::TripleDES, SymmetricAlgorithm::CAST5, @@ -597,7 +595,7 @@ mod tests { SymmetricAlgorithm::Camellia192, SymmetricAlgorithm::Camellia256].iter() { let mut key = vec![0; algo.key_size().unwrap()]; - rng.random(&mut key); + ::crypto::random(&mut key); let mut ciphertext = Vec::new(); { |