/
Use platform independent crc32 version [5.2.1-RC1]
Use platform independent crc32 version [5.2.1-RC1]
The crc32
function behaves differently based on PHP (4.x, 5.x) or platform (32bit or 64bit). In particular in last PHP versions it always returns positive number (bigint), but used to return also negative numbers (int) before. This has created problems in past due hashes created on one server weren't matching ones, created on other server.
Here is how such problem was solved in past: abs(crc32(x))
. Such approach can result in duplicate CRC2 for values, that has N and -N CRC32 values. I recommend using kUtil::crc32
function, that does this: sprintf('%u', crc32(x))
.
Related Discussions
Related Tasks
, multiple selections available,
Related content
Storing function "crc32" results in database problem [5.2.0-B2]
Storing function "crc32" results in database problem [5.2.0-B2]
More like this
Generating random string at install [5.3.0-B1]
Generating random string at install [5.3.0-B1]
More like this
2.5.1. Работа с классом kDBItem
2.5.1. Работа с классом kDBItem
More like this
[caching] Memcache issues
[caching] Memcache issues
More like this
[database] Non-unique "ResourceId" for users with DB Load Balancer [5.2.2-B2]
[database] Non-unique "ResourceId" for users with DB Load Balancer [5.2.2-B2]
More like this
[data management] Unable to clear date fields programmatically [5.2.2-B2]
[data management] Unable to clear date fields programmatically [5.2.2-B2]
More like this