How many random elements before MD5 produces collisions?

前端 未结 8 1799
执笔经年
执笔经年 2020-11-22 12:25

I\'ve got an image library on Amazon S3. For each image, I md5 the source URL on my server plus a timestamp to get a unique filename. Since S3 can\'t have subdirectories, I

相关标签:
8条回答
  • 2020-11-22 12:42

    While there have been well publicized problems with MD5 due to collisions, UNINTENTIONAL collisions among random data are exceedingly rare. On the other hand, if you are hashing on the file name, that's not random data, and I would expect collisions quickly.

    0 讨论(0)
  • 2020-11-22 12:46

    Doesn't really matter how likely it is; it is possible. It could happen on the first two things you hash (very unlikely, but possible), so you'll need to support collisions from the beginning.

    0 讨论(0)
提交回复
热议问题