Differences From Artifact [60645bf692]:
- File src/macros.h — part of check-in [b98fd10000] at 2012-12-26 19:55:26 on branch trunk — Add -[OFString stringByStandardizing(URL)Path]. (user: js, size: 9010) [annotate] [blame] [check-ins using]
To Artifact [19f9d4c0fa]:
- File
src/macros.h
— part of check-in
[7cebeaa808]
at
2013-01-03 22:26:36
on branch trunk
— OFMapTable: Rotate hashes randomly.
This makes the map table use the full range of the hash and not only the
least significant bits, making it harder for an attacker to find
collisions. (user: js, size: 9163) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
324 325 326 327 328 329 330 331 332 333 334 335 336 337 | #if defined(__MACH__) && defined(__arm__) # define OF_IOS #endif #define OF_ROL(value, bits) \ (((value) << ((bits) % (sizeof(value) * 8))) | \ (value) >> (sizeof(value) * 8 - ((bits) % (sizeof(value) * 8)))) #define OF_HASH_INIT(hash) hash = of_hash_seed #define OF_HASH_ADD(hash, byte) \ { \ hash += (uint8_t)(byte); \ hash += (hash << 10); \ hash ^= (hash >> 6); \ | > > > | 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | #if defined(__MACH__) && defined(__arm__) # define OF_IOS #endif #define OF_ROL(value, bits) \ (((value) << ((bits) % (sizeof(value) * 8))) | \ (value) >> (sizeof(value) * 8 - ((bits) % (sizeof(value) * 8)))) #define OF_ROR(value, bits) \ (((value) >> ((bits) % (sizeof(value) * 8))) | \ (value) << (sizeof(value) * 8 - ((bits) % (sizeof(value) * 8)))) #define OF_HASH_INIT(hash) hash = of_hash_seed #define OF_HASH_ADD(hash, byte) \ { \ hash += (uint8_t)(byte); \ hash += (hash << 10); \ hash ^= (hash >> 6); \ |
︙ | ︙ |