Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

Аватара для Казбек

Ветеран


Сообщения: 5380
Благодарности: 1875

Профиль | Отправить PM | Цитировать


Я был не прав: метаданные здесь не при чем. Меня ввел в заблуждение ответ на stackoverflow.com:
Цитата:
MD5 algorithm computes the file entierely, including metadata (filename, dates, etc) which are stored into the file, so two files can be identical in "main content" but different in some bytes.
А это не так, и как следует из статьи:
Цитата:
For example, the MD5 hash value of Lincoln’s Gettysburg Address in plain (Notepad) text is E7753A4E97B962B36F0B2A7C0D0DB8E8. Anyone, anywhere performing the same calculation on the same data will get the same unique value in a fraction of a second.
И это верно, насоздавав таких файлов в разные периоды времени с разными именами, я получил их одинаковые контрольные суммы.
Что подтверждается статьей:
Цитата:
When the data is comprised of loose files and attachments, a hash algorithm tends to be applied to the full contents of the files. Notice that I said to “contents.” Some data we associate with files is not actually stored inside the file but must be gathered from the file system of the device storing the data. Such “system metadata” is not contained within the file and, thus, is not included in the calculation when the file’s content is hashed. A file’s name is perhaps the best example of this. Recall that even slight differences in files cause them to generate different hash values. But, since a file’s name is not typically housed within the file, you can change a file’s name without altering its hash value.
Deduplication: Why Computers See Differences in Files that Look Alike
Тогда у меня возник вопрос, почему же мои ISO образы имеют разные контрольные суммы. Понасоздавав таких образов с помощью 4 разных программ и открыв их в HxD редакторе, сравнив их, я обнаружил, что так происходит из-за таймштампа, который программы добавляют в код ISO-образа:
Скрин

Под номерами даты в формате ISO (YYYY-MM-DDTHH:MM:SS).
То есть метаданные не причем, все дело в этих таймштампах, которые программы для создания образа добавляют. У двух программ, кроме дат были еще различие в нескольких слэшах.

-------
Кто реку перешел, тому росы бояться ни к чему

Это сообщение посчитали полезным следующие участники:

Отправлено: 10:17, 29-10-2017 | #16