Fast hash function with collision possibility near SHA-1

前端 未结 7 1875
情书的邮戳
情书的邮戳 2021-02-20 06:52

I\'m using SHA-1 to detect duplicates in a program handling files. It is not required to be cryptographic strong and may be reversible. I found this list of fast hash functions

7条回答
  •  感情败类
    2021-02-20 07:33

    128 bits is indeed good enough to detect different files or chunks. The risk of collision is infinitesimal, at least as long as no intentional collision is being attempted.

    64 bits can also prove good enough if the number of files or chunks you want to track remain "small enough" (i.e. no more than a few millions ones).

    Once settled the size of the hash, you need a hash with some very good distribution properties, such as the ones listed with Q.Score=10 in your link.

提交回复
热议问题