BencodeNET icon indicating copy to clipboard operation
BencodeNET copied to clipboard

InfoHash and OriginalInfoHash are different

Open somegenericdev opened this issue 9 months ago • 1 comments

It is entirely possible that I'm misunderstanding something, but I dont get why these two values are different. Keep in mind that I'm not manipulating the file in any way, I'm just parsing it like this

var torrentFile = File.ReadAllBytes("my.torrent");
var parser = new BencodeParser();
var torrent = parser.Parse<Torrent>(torrentFile);

and then accessing the hashes.

Image

somegenericdev avatar Apr 17 '25 21:04 somegenericdev

It's been quite a while since I worked on this, but OriginalInfoHash is the info hash stored in the torrent file, while GetInfoHash() calculates the info hash from the parsed data.

You torrent file is probably not strictly following the bittorrent standard which results in the info hash being different. It's usually something related to the files information.

Krusen avatar Apr 18 '25 04:04 Krusen