TTH Hash

From DCppWiki

Jump to: navigation, search

A SR command/Search command extension/modification that enables clients to identify files by hash.


$GetMeta <meta-type>$<extended-filename>|
$Meta <meta-type>:<meta-data>$<extended-filename>|
extended-filename := <meta-type>:<base32-encoded-hash> || <filename>
meta-type := TTH;<hash-tree-depth-requested>

Note: The answer will look like TTH;X: where X is the actual amount of levels sent. Dont count on this being what you requested, and also dont count on the returned data to adher to this or anything else. Also, validate the tree. (this is just robustness tips) BCDC++ currently stores 9 levels of trees.


The number 9 (the first available search-type) is used when searching by hash. the search term must consist of "TTH:<base32encoded-tigertree-hash>"

SR (Search Result)

When the client knows the root hash of a file, it should not send HubName in the $SR, but instead "TTH:<base32encoded-tigertree-hash>" (note that the hub name field is still postceeded by the hubaddress and port)

Note: This describes the hashing extension present in BCDC++ versions up to 0.306. After DC++ implemented hashing in 0.307, support for this extension was dropped. Neo-Modus 2.x implemented hashing in a BCDC compatible way; its implementation predated that in DC++.