https://github.com/averms/xp-getentropy
Cross-platform getentropy.
https://github.com/averms/xp-getentropy
Last synced: about 1 year ago
JSON representation
Cross-platform getentropy.
- Host: GitHub
- URL: https://github.com/averms/xp-getentropy
- Owner: averms
- License: isc
- Created: 2020-12-04T23:51:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-29T01:00:34.000Z (over 5 years ago)
- Last Synced: 2025-01-26T02:44:28.755Z (over 1 year ago)
- Language: C
- Homepage:
- Size: 85.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# getentropy cross-platform
[](https://builds.sr.ht/~aman/xp-getentropy?)
[](https://github.com/averms/xp-getentropy/actions)
[](https://ci.appveyor.com/project/ayofloweshiou/xp-getentropy)
A cross-platform way to get cryptographically-secure random bytes.
**Fortunately, this library has been obsoleted by [POSIX
2024](https://pubs.opengroup.org/onlinepubs/9799919799/functions/getentropy.html)**.
## usage
There is a single function, `xp_getentropy`. It is documented in the header
file [`xp_gentropy.h`](include/xp_getentropy.h).
## platforms
Should work on any platform with a C99 compiler.
Tested on:
- Various Linux distros from kernel 3.10 up to 5.4
- FreeBSD 11.4 and 12.2
- OpenBSD 6.7
- NetBSD 9.1
- DragonflyBSD 5.8.3
- macOS 10.14, 10.15, and 11
- OpenIndiana Hipster 2020.10
- Windows Server 2019 with MSVC 16.8
- Windows Server 2016 with MSVC 15.9
- Cygwin 3.0.7
- Emscripten 2.0.10 (not WASM, just the JS output)
## legal
Parts are copied from LibreSSL Portable under the ISC license. Parts that I
wrote are also distributed under the ISC license. See [LICENSE](LICENSE) file
for details.