Tim Düsterhus
804c3fc821
Fix byte expansion in rand_rangeXX() ( #9056 )
...
* Fix shift in rand_range??()
The last generated size is in bytes, whereas the shift is in bits. Multiple the
generated size by 8 to correctly handle each byte once.
* Correctly handle user engines returning less than 4 bytes in rand_rangeXX()
We need to loop until we accumulate sufficient bytes, instead of just checking
once. The version in the rejection loop was already correct.
* Clean up some repetition in rand_rangeXX()
2022-07-20 17:33:10 +02:00
..
2022-06-17 14:12:53 +02:00
2022-06-25 07:40:19 +01:00
2022-07-19 15:11:42 +02:00
2022-07-19 15:11:42 +02:00
2021-12-20 18:12:35 +00:00
2022-06-26 01:00:19 +02:00
2022-07-19 15:11:42 +02:00
2022-07-04 10:50:32 +01:00
2022-06-17 16:33:20 +02:00
2022-07-19 15:11:42 +02:00
2022-07-19 15:11:42 +02:00
2022-07-19 15:11:42 +02:00
2022-07-19 15:11:42 +02:00
2022-07-19 15:11:42 +02:00
2022-07-19 15:11:42 +02:00
2022-07-19 15:11:42 +02:00
2022-06-29 14:04:40 +02:00
2021-08-25 15:29:46 +02:00
2022-07-19 15:11:42 +02:00
2022-07-19 15:11:42 +02:00
2022-07-19 15:11:42 +02:00
2022-07-19 15:11:42 +02:00
2022-07-08 17:39:05 +01:00
2022-07-19 15:11:42 +02:00
2022-07-19 15:11:42 +02:00
2022-07-19 15:11:42 +02:00
2022-07-20 17:01:42 +02:00
2022-07-19 15:11:42 +02:00
2022-06-10 12:45:30 -04:00
2022-07-18 11:43:33 +02:00
2022-07-20 11:49:22 +02:00
2022-07-20 09:15:37 +01:00
2022-07-20 15:40:10 +02:00
2022-07-16 13:05:16 -05:00
2022-07-11 19:45:46 +02:00
2022-07-18 11:43:33 +02:00
2021-12-15 08:38:35 -05:00
2022-07-12 11:57:25 +02:00
2022-06-09 13:42:45 +02:00
2022-06-13 14:44:49 +02:00
2022-06-09 13:29:20 +01:00
2022-07-19 10:55:50 +02:00
2022-06-06 12:21:25 +02:00
2022-07-20 17:18:34 +02:00
2021-09-06 17:14:52 +02:00
2021-09-06 17:14:52 +02:00
2022-07-20 17:33:10 +02:00
2021-09-06 17:14:52 +02:00
2022-07-19 10:27:38 +01:00
2022-07-19 10:27:38 +01:00
2021-09-02 23:49:05 +02:00
2022-06-26 01:00:19 +02:00
2021-09-29 11:59:05 +02:00
2022-05-23 21:57:31 +01:00
2022-07-19 10:27:38 +01:00
2022-07-10 20:06:52 +01:00
2022-07-18 11:43:33 +02:00
2022-07-19 16:46:32 +02:00
2022-04-11 17:08:48 +02:00
2022-07-20 17:18:34 +02:00
2021-08-18 16:39:36 +02:00
2021-07-20 12:28:35 +02:00
2022-05-16 14:47:02 +02:00
2022-06-26 01:00:19 +02:00
2022-06-12 10:56:35 +02:00
2022-03-13 13:48:21 +00:00
2021-10-12 16:43:40 +02:00
2022-05-22 16:06:27 +01:00
2021-11-03 15:18:26 +03:00
2022-07-18 10:58:50 +01:00
2022-07-18 11:43:33 +02:00
2022-06-25 07:40:19 +01:00
2021-08-19 09:43:32 +02:00