Commit graph

9 commits

Author SHA1 Message Date
e1367d5bff Use snprintf() instead of sprintf().
All linker warnings should now be eliminated.
2023-04-25 22:01:58 +00:00
d933d12e1b Make Rand use a provided Mersenne Twister.
This implementation is loosely inspired by the original paper on the
Mersenne Twister, and borrows code from a public-domain implementation of
it, adapting it to fit the style of Telodendria's code, and fixing a few
bugs regarding the size of the data type used.

Neither C nor POSIX provide a good, thread-safe pseudorandom number
generator. The OpenBSD linker started complaining about the use of
rand_r(), and no standard alternative presented itself as worthy of
consideration, so I finally decided it was time to roll my own PRNG.
2023-04-25 21:28:55 +00:00
8b8873103d Handle standard library quirks of non-conforming systems and compilers. 2023-02-05 14:20:12 +00:00
3c8d89a52e Update copyright year 2022-12-26 15:52:52 +00:00
be2e267064 Turns out I don't need to do that. 2022-12-24 01:31:22 +00:00
61e9cdbea3 Check INT_WIDTH and LONG_WIDTH... stupid GNU libc. 2022-12-24 01:00:36 +00:00
25dcff06a8 Fix type issues. 2022-12-19 23:25:37 +00:00
72bfa34bcd Fix overflow on some platforms 2022-12-19 22:25:49 +00:00
94493e6ad8 Add Sha2 2022-12-19 22:15:41 +00:00