php-src/ext/random
Tim Düsterhus 6fb20cd9de
random: Simplify implementation of php_random_generate_fallback_seed() (#13761)
As all the input bits and pieces are mixed with SHA-1, cross-architecture
compatibility is not required and we can just mix in whatever they may look
like in memory, instead of going through the `write_*()` helpers that were
created for a previous in-development version that first filled a buffer that
was then hashed (allowing for easy inspection of the input data, but making it
harder to safely add values without checking for buffer overflows all the
time).

This change should also fix a build error on macOS ZTS: The thread ID is an
opaque type and not guaranteed to be arithmetic as per IEEE Std 1003.1-2017.
And indeed macOS defines it as a pointer to a structure, failing due to the
implicit pointer to integer conversion.
2024-03-20 09:41:01 +01:00
..
tests Merge branch 'PHP-8.3' 2024-02-29 18:15:09 +01:00
config.m4 random: Move CSPRNG API into php_random_csprng.h (#13290) 2024-02-01 19:09:35 +01:00
config.w32 random: Move CSPRNG API into php_random_csprng.h (#13290) 2024-02-01 19:09:35 +01:00
CREDITS
csprng.c random: Move CSPRNG API into php_random_csprng.h (#13290) 2024-02-01 19:09:35 +01:00
engine_combinedlcg.c random: Use CSPRNG for CombinedLCG seeding (#13748) 2024-03-19 20:13:44 +01:00
engine_mt19937.c random: Improve the output quality of RANDOM_SEED() (#13730) 2024-03-18 16:08:23 +01:00
engine_pcgoneseq128xslrr64.c random: Clean up seeding API (#13540) 2024-02-29 08:03:35 +01:00
engine_secure.c random: Clean up seeding API (#13540) 2024-02-29 08:03:35 +01:00
engine_user.c random: Clean up seeding API (#13540) 2024-02-29 08:03:35 +01:00
engine_xoshiro256starstar.c random: Clean up seeding API (#13540) 2024-02-29 08:03:35 +01:00
gammasection.c random: Pass algorithm and state together as php_random_algo_with_state (#13350) 2024-02-25 20:48:58 +01:00
php_random_csprng.h random: Move CSPRNG API into php_random_csprng.h (#13290) 2024-02-01 19:09:35 +01:00
php_random_uint128.h random: Split the uint128 implementation into its own header (#13132) 2024-01-17 16:07:45 +01:00
php_random.h random: Improve the output quality of RANDOM_SEED() (#13730) 2024-03-18 16:08:23 +01:00
random_arginfo.h Implement "support doc comments for internal classes and functions" (#13266) 2024-02-25 08:41:31 +01:00
random.c random: Simplify implementation of php_random_generate_fallback_seed() (#13761) 2024-03-20 09:41:01 +01:00
random.stub.php Deprecate MT_RAND_PHP (#11560) 2023-07-07 12:16:48 +02:00
randomizer.c random: Adjust status to state (#13521) 2024-02-26 20:38:45 +01:00