在洪流客户端的哈希计算 [英] Hash calculation in torrent clients

查看:185
本文介绍了在洪流客户端的哈希计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有人知道BitTorrent客户端中的哈希是指什么,它显然不是该文件的哈希代码,但有些不同。



我认为这更多的是一个磁盘链接到一个文件,但它是如何连接到文件本身?



我只是想了解场景背后的结构。

文件< - >哈希< - >在torrent客户端中的哈希值

解决方案

在一个torrent客户端中的哈希或者你在a中找到的哈希 magnet-URI 是原始 bencoded info-dictionary - torrent部分 - 文件。



为了理解这个方法,你需要知道两件事:


  • torrent如何构建。


  • 如何 bencode ing完成。 http://bittorrent.org/beps/bep_0003.html



    然而我建议你而是阅读您可以在这里找到的规范说明: https://wiki.theory.org/BitTorrentSpecification

    ,因为它更容易理解。


    I was wondering if someone knows what a "hash" in a BitTorrent client is referring to, it is clearly not the hashcode of the file, but something different.

    I think thats more a magnet link to a file, but how is this connected to the file itself?

    I just want to understand the construct behind the scene.
    File <--> Hash <---> hash in torrent client

    解决方案

    The hash in a torrent client or the hashyou find in a magnet-URI is the SHA1-hash of the raw bencoded info-dictionary-part of a torrent-file.

    To understand how that works you need to know two things:

    • How a torrent-file is built.

    • How bencodeing is done.

    Both of these are explained in the offical bittorrent specification that you can find here: http://bittorrent.org/beps/bep_0003.html

    However I recommed that you instead read the inoffical specification that you can find here: https://wiki.theory.org/BitTorrentSpecification
    as it is much easier to understand.

    这篇关于在洪流客户端的哈希计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆