On Wed, 27 Jul 2011, subscript...@innter.net wrote:
Hello,
I have found that C and Perl versions (tools/rehash) of dir_hash_c have
different results. For part of mailboxes.
Perl code :
$n = 0;
foreach my $b (split(/ */, $auth_user)) {
$n = (($n 3) ^ ($n 5)) ^ ord($b);
}
$h =
Hello,
I have found that C and Perl versions (tools/rehash) of dir_hash_c have
different results. For part of mailboxes.
Perl code :
$n = 0;
foreach my $b (split(/ */, $auth_user)) {
$n = (($n 3) ^ ($n 5)) ^ ord($b);
}
$h = chr(ord('A') + ($n % 23));
./mbpath user.biz53p2
Result : A
On Wed, Jul 27, 2011 at 03:22:05AM +0600, subscript...@innter.net wrote:
This is wrong.
Can someone explain that is wrong in perl version and how to fix this?
I think it's the 32bit vs 64bit issue. There's an open bug for it in
bugzilla.
(personally, I think fulldirhash is wrong, but that's