Bittorrent tracker request, format of info_hash

后端 未结 2 929
醉酒成梦
醉酒成梦 2021-01-18 00:32

When I want to send an initial request to a tracker all references I\'ve seen says it needs to be url-encoded. If I transform the SHA-1 hash I have of the info key into a he

2条回答
  •  鱼传尺愫
    2021-01-18 00:54

    The info_hash parameter is not a hex string. It's a pure binary string, so yes, you will have to URL-encode many of the bytes in it. (This tends to make it longer in the end than just using a hex-encoded string, but that's the BitTorrent protocol for you, too late to do anything about it now!)

提交回复
热议问题