Re: [RFC] [Under Discussion] Random Extension Improvement

From: Date: Mon, 20 Jun 2022 15:42:43 +0000
Subject: Re: [RFC] [Under Discussion] Random Extension Improvement
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-118019@lists.php.net to get a copy of this message
Hi On 6/20/22 17:12, Go Kudo wrote:
CombinedLCG
This is provided as an OOP implementation for the lcg_value() function, but I don't actually want it to be used anymore, so I probably shouldn't provide a class for it. And to begin with, the current CombinedLCG cannot even be seeded with arbitrary values. However, I think it needs to remain in the internal API either way. (The option of not providing it to userland is a valid one.)
I wouldn't object to dropping CombinedLCG, especially since its internal parameters are not defined via the name (contrary to MT19937).
What do you think about the Random\CryptoSecureEngine interface? It is just a marker interface with no methods. However, I currently think it is better than adding a method like isSecure(): bool to the Random\Engine.
I *much* prefer the marker interface. Best regards Tim Düsterhus

« previous php.internals (#118019) next »