Closed mattheu closed 10 years ago
Shouldn't make a difference; SHA1 (and MD5 for that matter) should be unsigned integers, plus they're returned hex-encoded.
As noted on the crc32
page:
Returns the crc32 checksum of str as an integer.
sha1
however (with second parameter false, which is the default):
Returns the sha1 hash as a string.
I know some hashing algorithms can return negative hash values on 32 bit systems (crc32 and md5 I think), and that it is best to use
hash( $algo, $data );
instead. Does this apply to SHA1 as well?https://github.com/humanmade/Backdrop/blob/master/task.php#L73
Could be
return hash( 'sha1', serialize( $this->callback ) . serialize( $this->params ) );