1N/A chdir 't' if -d 't'; 1N/A# second part using an emulation of the PERL_HASH in perl, mounting an 1N/A# attack on a prepopulated hash. This is also useful if you need normal 1N/A# keys which don't contain \0 -- suitable for stashes 1N/A# some initial hash data 1N/A "starting with pre-populated non-pathalogical hash (rehash flag if off)");
1N/A scalar(@keys) . " colliding into the same bucket keys are triggerring rehash");
1N/A # the minimum of bits required to mount the attack on a hash 1N/A # if the hash has already been populated with a significant amount 1N/A # of entries the number of mask bits can be higher 1N/A # need to add 2 bits to cover the internal split cases 1N/A # get 2 keys on top of the THRESHOLD 1N/A # next if exists $hash->{$s}; 1N/A# trying to provide the fastest equivalent of C macro's PERL_HASH in 1N/A# Perl - the main complication is that it uses U32 integer, which we 1N/A# can't do it perl, without doing some tricks 1N/A # (A % M) + (B % M) == (A + B) % M 1N/A # This works because '+' produces a NV, which is big enough to hold 1N/A # the intermidiate result. We only need the % before any "^" and "&" 1N/A # to get the result in the range for an I32. 1N/A # and << doesn't work on NV, so using 1 << 10