gurza
|
_n0d_
|
|
|
|
Рег.: 07.12.2005
|
Сообщений: 445
|
|
Рейтинг: 79
|
|
eD2k: какой хэш используют в ссылке?
30.01.2008 01:29
|
|
|
К примеру, есть у меня линк вида ed2k://|file|Koshmar.avi|1468116992| B948C74C4569E8A5EF9888E8C6B961AD |
Подскажите плз каким алгоритмом получен выделенный хэш?
|
|
Kai
|
|
|
|
|
Рег.: 25.10.2002
|
Сообщений: 8251
|
|
Рейтинг: 818
|
|
Re: eD2k: какой хэш используют в ссылке?
[re: gurza]
30.01.2008 01:37
|
|
|
|
gurza
|
_n0d_
|
|
|
|
Рег.: 07.12.2005
|
Сообщений: 445
|
|
Рейтинг: 79
|
|
Re: eD2k: какой хэш используют в ссылке?
[re: Kai]
30.01.2008 01:50
|
|
|
|
darktemplar
|
|
|
|
|
Рег.: 13.09.2004
|
Сообщений: 11202
|
|
Рейтинг: 2525
|
|
Re: eD2k: какой хэш используют в ссылке?
[re: gurza]
30.01.2008 13:49
|
|
|
ed2k hash algorithm
The ed2k hash function is a MD4 root hash of an MD4 hash list, and gives a different result than simply MD4:
The file data is divided into full chunks of 9500 KiB (9728000 bytes or nearly 9.28 MB) plus a remainder chunk, and a separate 128-bit MD4 checksum is computed for each. If the file length is an exact multiple of 9500 KiB, the remainder zero size chunk is still used at the end of the hash list. The ed2k hash is computed by concatenating the chunks' MD4 checksums in order and hashing the result using MD4. Although, if the file is composed of a single non-full chunk, its MD4 hash is used with no further modifications.
This method of hashing allows the recipient to verify that a hash list corresponds to the original ed2k file hash, without the need to have the data blocks.
It should be noted that what to do when a file ends on a full chunk is undefined. This means that the final hash of a file which is a multiple of 9728000 bytes in size may be computed one of two ways: using the existing MD4 chunk hashes, or using the existing MD4 hashes plus the MD4 hash of an all-zeros chunk. Some programs use one method or the other, and a few use both. So, two different ed2k hashes may be produced for the same file in different programs if the file is a multiple of 9728000 bytes in size.
|
|