From 7f33223496261d0078f9f60bdf7ac545f575b013 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Tue, 29 Jul 2025 23:25:07 +0100 Subject: [PATCH] Fix type name for BCRYPT_ALG_HANDLE in win_fill function --- src/random/crypto.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/random/crypto.rs b/src/random/crypto.rs index 6943d6a..678493f 100644 --- a/src/random/crypto.rs +++ b/src/random/crypto.rs @@ -57,7 +57,7 @@ impl Rng for CryptoRng { fn win_fill(buf: &mut [u8]) -> Result<(), ()> { use core::ffi::c_void; - type BCRYPT_ALG_HANDLE = *mut c_void; + type BcryptAlgHandle = *mut c_void; type NTSTATUS = i32; const BCRYPT_USE_SYSTEM_PREFERRED_RNG: u32 = 0x0000_0002; @@ -65,7 +65,7 @@ fn win_fill(buf: &mut [u8]) -> Result<(), ()> { #[link(name = "bcrypt")] extern "system" { fn BCryptGenRandom( - hAlgorithm: BCRYPT_ALG_HANDLE, + hAlgorithm: BcryptAlgHandle, pbBuffer: *mut u8, cbBuffer: u32, dwFlags: u32,