Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

当两张图片内容不同而MD5相同时,上传会出错,只能上传其中一张 #156

Closed
7hc opened this issue Jul 28, 2020 · 5 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@7hc
Copy link

7hc commented Jul 28, 2020

上传结果

image

测试图片

ship

planes

建议

  • 使用两种及以上的哈希算法来确定图片是否相同
@0xxb 0xxb added the enhancement New feature or request label Jul 28, 2020
@0xxb
Copy link
Collaborator

0xxb commented Jul 28, 2020

还有这种操作我是没想到的

@0xxb 0xxb added the bug Something isn't working label Jul 28, 2020
@7hc
Copy link
Author

7hc commented Jul 28, 2020

还有这种操作我是没想到的

百度网盘和知乎也没逃过

@lepig
Copy link

lepig commented Jul 30, 2020

涨见识了, 确实得使用2种以上来判断。
使用sha1算出来就是不同的。

@Minscs
Copy link

Minscs commented Jul 30, 2020

文件: C:\Users\Admin\Desktop\1.jpg
大小: 335104 字节
修改时间: 2020年7月30日, 15:04:32
MD5: 253DD04E87492E4FC3471DE5E776BC3D
SHA1: 9639DB1FBADFCFBD4025A9B95D10B7799F65FCFB
CRC32: 690FC689

文件: C:\Users\Admin\Desktop\2.jpg
大小: 335104 字节
修改时间: 2020年7月30日, 15:04:59
MD5: 253DD04E87492E4FC3471DE5E776BC3D
SHA1: 780973C1C165E76DE3F10E1771DB31CF9362D1F5
CRC32: 7FD01BDA

这是啥原理,为啥MD5相同

@7hc
Copy link
Author

7hc commented Jul 30, 2020

文件: C:\Users\Admin\Desktop\1.jpg
大小: 335104 字节
修改时间: 2020年7月30日, 15:04:32
MD5: 253DD04E87492E4FC3471DE5E776BC3D
SHA1: 9639DB1FBADFCFBD4025A9B95D10B7799F65FCFB
CRC32: 690FC689
文件: C:\Users\Admin\Desktop\2.jpg
大小: 335104 字节
修改时间: 2020年7月30日, 15:04:59
MD5: 253DD04E87492E4FC3471DE5E776BC3D
SHA1: 780973C1C165E76DE3F10E1771DB31CF9362D1F5
CRC32: 7FD01BDA
这是啥原理,为啥MD5相同

MD5是有穷的,数据是无穷的,加上MD5碰撞算法的出现,这两张图就出来了。
末尾有相关论文链接

0xxb pushed a commit that referenced this issue Aug 11, 2020
@0xxb 0xxb closed this as completed in 02adeab Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants