[bittorrent] About getting the info hash value from a .torrent file

FYP 2005 hkucsfyp2005 at gmail.com
Tue Oct 25 11:00:50 EDT 2005


Thanks all of you.
Now I know which part of the torrent should be used to compute sha1 hash.

Here's a compacted version of my torrent file with brackets inserted:
d8:announce...info[d6:length...e]e

Another problem occurred.
I found a correct sha1 algorithm written in Java(it just takes a string as
argument).
But I can't get the correct sha1 value from the algorithm when I hash all
the bytes between the brackets.
P.S. I just read in the bytes between the brackets into a StringBuffer
and then convert the StringBuffer into a String.
And pass the String into the sha1 algorithm.

Is my method ok ?
Can anyone point out my problems ?

thx ~~~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ibiblio.org/pipermail/bittorrent/attachments/20051025/25a07249/attachment.html 


More information about the BitTorrent mailing list