portable_get_random
holo
portable_get_random | holo | |
---|---|---|
1 | 2 | |
0 | 93 | |
- | - | |
10.0 | 10.0 | |
over 2 years ago | about 1 year ago | |
C | Go | |
MIT License | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
portable_get_random
-
Go 1.20 Released
To get cryptographically grade randomness you can use one of these C functions:
BSD, newer macOS, and GNU libc: int getentropy(void buffer, size_t length);
Linux 3.19+: ssize_t getrandom(void buf, size_t buflen, unsigned int flags);
iOS and macOS 10.7+: int SecRandomCopyBytes(SecRandomRef, size_t, uint8_t );
Fuchsia: void zx_cprng_draw(void* buffer, size_t buffer_size);
Any *nix: Read from "/dev/random" (or "/dev/urandom" under the assumption that your system has already enough entropy).
Windows: There are different functions/libraries depending on the Windows version and some of them are a complicated multi-step mess.
Some time ago I wrote a C library that abstracts that away just for fun: https://github.com/panzi/portable_get_random
holo
-
In Praise of Alpine and APK
I have a similar toolchain, fully using native system packages, built around Holo [1] as a config management tool and holo-build [2] as a distro-independent package building tool. In the intended state, the root configuration package (e.g. [3] for my desktop PC) is the only explicitly installed package on the system.
[1] https://holocm.org
-
Go 1.20 Released
That's not the same. `go test -c` builds a binary that runs your tests, whereas (if I understand correctly) the new thing builds a binary that runs your main(). If it works as I understand, that would be fantastic because then I could get rid of this monstrosity: https://github.com/holocm/holo/blob/master/main_test.go
What are some alternatives?
prometheus - The Prometheus monitoring system and time series database.
system-configuration - Configuration for my Arch Linux systems, using Holo configuration management