Subject: | Incorrect results with NULL characters in strings |
Digest::DJB::djb uses a NULL character ("\x00") as a string-terminator. Perl allows NULL's in
strings, so a NULL should not signal end-of-string.
Example program:
Show quoted text
>>>
use strict;
use Digest::DJB qw();
print Digest::DJB::djb("hi") . "\n";
print Digest::DJB::djb("hi\x00") . "\n";
print Digest::DJB::djb("hi\x00\x00") . "\n";
<<<
Output:
Show quoted text>>>
5863446
5863446
5863446
<<<
Expected output:
* different hash values for each string