Boost logo

Boost :

From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2024-12-08 21:18:03


On 12/8/24 23:51, Peter Dimov via Boost wrote:
> Andrey Semashev wrote:
>>> All that leads me to the thought that I've got get_integral_result
>>> wrong; it should take the hash algorithm directly, not its result, and
>>> should invoke result() as many times as needed to obtain the necessary
>>> number of bits.
>>
>> This would be incompatible with algorithms that don't support multiple calls to
>> finalize().
>
> That is why multiple calls to result() (there's no finalize) are required to be
> supported.

Does this mean you're not going to support algorithms that require no
more than one call to finalize()/result()? (I'm using finalize() as the
name Vinnie has agreed with.)

This does not have to be the case, though. You could extend the hash
value using some specific algorithm that does support multiple calls to
finalize()/result(). It doesn't have to be the same algorithm that
produced the original value.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk