On Sunday, 4 February 2024 06:12:18 PST Giuseppe D'Angelo via Development 
wrote:
> Il 03/02/24 22:08, Thiago Macieira ha scritto:
> > But what about a zero seed? It's what we call a "deterministic hashing".
> > We
> > have changed the algorithms on .0 releases (in both 5.0 and 6.0 for
> > QString).
>
> I don't think it means "deterministic" in the sense that the output will
> never change across Qt versions. It just means deterministic across
> multiple runs of the very same application using the very same Qt version.

Indeed but how would it know that it is the same Qt version? It might be 
running with a system Qt that got upgraded in the background, so a new start 
would change it. For that matter, it's far more likely that it's an 
application and its helper at the same time, but even then they can't 
guarantee they're using the same Qt.

> When you disable QHash seeding, the choice of making the seed equal to 0
> is just "a choice"; we could make it 42 or 0xF0CACC1A, for what is
> worth. qHash can still change its output at any time across Qt versions
> and software should never ever rely on that.

I'm not sure.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering

Attachment: smime.p7s
Description: S/MIME cryptographic signature

-- 
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to