summaryrefslogtreecommitdiffstats
path: root/openpgp/src/crypto/mod.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-07-02 18:43:17 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-07-02 19:02:15 +0200
commit92371c26e33119d2ea162d9a8bfdabe45f9400ec (patch)
tree76d6b985f72745a1034603efc177084ae6bbfd77 /openpgp/src/crypto/mod.rs
parent679b3631aa40663bd23778fc4776c3da8ba3cef0 (diff)
openpgp: Simplify SessionKey::new.
Diffstat (limited to 'openpgp/src/crypto/mod.rs')
-rw-r--r--openpgp/src/crypto/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/crypto/mod.rs b/openpgp/src/crypto/mod.rs
index 36d6e921..5a6b06c0 100644
--- a/openpgp/src/crypto/mod.rs
+++ b/openpgp/src/crypto/mod.rs
@@ -35,9 +35,9 @@ pub struct SessionKey(mem::Protected);
impl SessionKey {
/// Creates a new session key.
- pub fn new(rng: &mut Yarrow, size: usize) -> Self {
+ pub fn new(size: usize) -> Self {
let mut sk: mem::Protected = vec![0; size].into();
- rng.random(&mut sk);
+ Yarrow::default().random(&mut sk);
Self(sk)
}