You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -676,7 +676,18 @@ nodevrandom:
676
676
}
677
677
```
678
678
679
-
On Windows systems, [CryptGenRandom](http://msdn.microsoft.com/en-us/library/aa379942.aspx) from the Win32 API provides cryptographically secure pseudorandom bytes. Microsoft provides the following usage example:
679
+
On recent Windows platforms, [BCryptGenRandom](https://docs.microsoft.com/en-us/windows/desktop/api/bcrypt/nf-bcrypt-bcryptgenrandom) (nothing to do with the password hash bcrypt) should be used to generate cryptographically secure data. Its interface is straightforward:
680
+
681
+
```C
682
+
NTSTATUS BCryptGenRandom(
683
+
BCRYPT_ALG_HANDLE hAlgorithm,
684
+
PUCHAR pbBuffer,
685
+
ULONG cbBuffer,
686
+
ULONG dwFlags
687
+
);
688
+
```
689
+
690
+
On legacy Windows platforms, [CryptGenRandom](http://msdn.microsoft.com/en-us/library/aa379942.aspx) from the legacy Win32 CryptoAPI provides cryptographically secure pseudorandom bytes. Microsoft provides the following usage example:
0 commit comments