Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.17] - unreleased
### Fixed
- `BCryptGenRandom` signature [#778]

[#778]: https://github.com/rust-random/getrandom/pull/778

## [0.2.16] - 2025-04-22
### Added
- Cygwin support (backport of [#626]) [#654]
Expand Down Expand Up @@ -461,6 +467,7 @@ Publish initial implementation.
## [0.0.0] - 2019-01-19
Publish an empty template library.

[0.2.17]: https://github.com/rust-random/getrandom/compare/v0.2.16...v0.2.17
[0.2.16]: https://github.com/rust-random/getrandom/compare/v0.2.15...v0.2.16
[0.2.15]: https://github.com/rust-random/getrandom/compare/v0.2.14...v0.2.15
[0.2.14]: https://github.com/rust-random/getrandom/compare/v0.2.13...v0.2.14
Expand Down
3 changes: 2 additions & 1 deletion src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extern "system" {
pBuffer: *mut u8,
cbBuffer: u32,
dwFlags: u32,
) -> u32;
) -> i32;
}

// Forbidden when targetting UWP
Expand All @@ -34,6 +34,7 @@ pub fn getrandom_inner(dest: &mut [MaybeUninit<u8>]) -> Result<(), Error> {
BCRYPT_USE_SYSTEM_PREFERRED_RNG,
)
};
let ret = ret as u32;
// NTSTATUS codes use the two highest bits for severity status.
if ret >> 30 == 0b11 {
// Failed. Try RtlGenRandom as a fallback.
Expand Down