diff options
Diffstat (limited to 'openpgp/src/crypto/backend/nettle.rs')
-rw-r--r-- | openpgp/src/crypto/backend/nettle.rs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/openpgp/src/crypto/backend/nettle.rs b/openpgp/src/crypto/backend/nettle.rs index 9bf737c0..79497a66 100644 --- a/openpgp/src/crypto/backend/nettle.rs +++ b/openpgp/src/crypto/backend/nettle.rs @@ -11,16 +11,8 @@ pub mod hash; pub mod symmetric; /// Fills the given buffer with random data. -/// -/// Fills the given buffer with random data produced by a -/// cryptographically secure pseudorandom number generator (CSPRNG). -/// The output may be used as session keys or to derive long-term -/// cryptographic keys from. However, to create session keys, -/// consider using [`SessionKey::new`]. -/// -/// [`SessionKey::new`]: crate::crypto::SessionKey::new() -pub fn random<B: AsMut<[u8]>>(mut buf: B) { - Yarrow::default().random(buf.as_mut()); +pub fn random(buf: &mut [u8]) { + Yarrow::default().random(buf); } impl PublicKeyAlgorithm { |