
On Fri, Dec 13, 2024 at 8:55 AM Peter Dimov via Boost
injecting nondeterminism in their default constructors seems user-hostile ... One might in principle make the case that a default constructor shouldn't be included
It is quite natural and expected that one can adapt an existing cryptographic hash algorithm to work with types that are Hash2-enabled. The default constructor has to exist, and should not have any additional behavior beyond what is prescribed by the actual hash algorithm. For example, a default constructed SHA256 hash algorithm should have the state prescribed in rfc6234 for when the algorithm is initialized and before any message data has been provided. Seeding or deleting the default constructor works against this. Thanks