小编Sud*_*nsu的帖子

pdf文件的md5校验和

请看一下下面的问题。

1 - Applying the MD5 on a .txt file containing "Hello" (without quotes, length = 5). It gives some hash value (say h1).
2 - Now file content are changed to "Hello " ( without quotes, length = 6). It gives some hash value (say h2).
3 - Now file is changed to "Hello" (exactly as step. 1). Now the hash is h1. Which makes sense.
Run Code Online (Sandbox Code Playgroud)

现在,如果该过程应用于 .pdf 文件,就会出现问题。在这里,我没有更改文件内容,而是更改文本的颜色并再次恢复为原始文件。通过这种方式,我得到了三个不同的哈希值。

那么,是因为pdf阅读器对文本和元数据的编码方式、哈希不同还是类比本身是错误的?

信息:- 使用 Windows 中的免费软件来计算哈希值。

hash md5

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

hash ×1

md5 ×1