On May 28, 2013, at 4:10 PM, Jens Alfke wrote:

> CRC is primarily a checksum, not a hash function. It's good for verifying 
> data integrity, e.g. in a network protocol or file format, but more expensive 
> than you’d like for a hash table. There are much faster hash functions: 
> Wikipedia has a good list[1].

http://en.wikipedia.org/wiki/Hash_function

Hashing with cryptographic hash functions [edit]
Some cryptographic hash functions, such as SHA-1, have even stronger uniformity 
guarantees than checksums or fingerprints, and thus can provide very good 
general-purpose hashing functions.
In ordinary applications, this advantage may be too small to offset their much 
higher cost.[5] However, this method can provide uniformly distributed hashes 
even when the keys are chosen by a malicious agent. This feature may help to 
protect services against denial of service attacks.

I thought I saw SHA-1 being used as a general purpose hash function somewhere 
sort of surprising recently but I'm not remembering exactly where. Maybe if the 
collision resistance or hash value uniformity out weigh the performance 
concerns?

Michael Hall

trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz

HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe

AppConverter convert Apple jvm to openjdk apps 
http://www195.pair.com/mik3hall/index.html#appconverter





_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to