[bittorrent] Pieces hash verification

Harold Feit dwknight at depthstrike.com
Mon Oct 4 18:48:09 EDT 2010

binary array, downloaded bytes.
Validation sizes will NEVER be larger than the piece_size value in the

Multi-file torrents will probably handle differently than you'd expect.
http://wiki.theory.org/BitTorrentSpecification may help

- Harold

On 04/10/2010 7:27 PM, André Martins wrote:
> Hi all,
> I'm  building a client and this part of verification is not totally
> clear for me.
> I'm wondering against hash of what should I compare  the hash that comes
> in the metafile *.torrent entry "pieces".
> Should I save the downloaded piece into a file and take the hash of the
> file or take the hash from a binary array with the downloaded bytes? or
> else?
> Could anyone give me a hint how to do that?
> Thanks in advance.
> []'s
> André Martins
> _______________________________________________
> BitTorrent mailing list
> BitTorrent at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/bittorrent

More information about the BitTorrent mailing list