BencodeNET
BencodeNET copied to clipboard
InfoHash and OriginalInfoHash are different
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.
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.