apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: Hash collision vectors in APR?
Date Thu, 26 Jan 2012 09:16:09 GMT
On 06.01.2012 00:05, Bojan Smojver wrote:
> On Fri, 2012-01-06 at 09:48 +1100, Bojan Smojver wrote:
>> The apr_hashfunc_t function prototype would then most likely have to
>> change. We'd probably need to pass the hash itself into it, which
>> would then hold the per-hash seed. Right?
> Actually, that would not be a good plan. A custom hash function would
> not be able to see inside the hash structure, because it's opaque. Most
> likely, the seed itself would have to be passed around as the third
> argument. Any other ideas?

- hash = ht->hash_func(key, &klen);
+ hash = randomize_hash(ht, ht->hash_func(key, &klen);

Completely private change that leaves hash_func_t unchanged.

-- Brane

View raw message