diff options
Diffstat (limited to 'openpgp/src/crypto/backend/cng.rs')
-rw-r--r-- | openpgp/src/crypto/backend/cng.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/crypto/backend/cng.rs b/openpgp/src/crypto/backend/cng.rs index 8bf01b02..f964756a 100644 --- a/openpgp/src/crypto/backend/cng.rs +++ b/openpgp/src/crypto/backend/cng.rs @@ -11,9 +11,9 @@ pub mod hash; pub mod symmetric; /// Fills the given buffer with random data. -pub fn random<B: AsMut<[u8]>>(mut buf: B) { +pub fn random(buf: &mut [u8]) { RandomNumberGenerator::system_preferred() - .gen_random(buf.as_mut()) + .gen_random(buf) .expect("system-preferred RNG not to fail") } |