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 12:43:33 GMT
On 26.01.2012 12:15, Bojan Smojver wrote:
> ------- Original message -------
>> From: Branko ─îibej
>
>> - hash = ht->hash_func(key, &klen);
>> + hash = randomize_hash(ht, ht->hash_func(key, &klen);
>>
>> Completely private change that leaves hash_func_t unchanged.
>
> Interesting approach. So, randomize_hash() would then perturb (xor or
> something) what the hash function returns based on the seed, right?

Correct. I intentionally left out the implementation, since i don't
really have an opinion about how it should be done. I just wanted to
point out that there's a simple way to add per-table randomization
without changing any of the existing APIs, or adding new ones.

-- Brane


Mime
View raw message