[bittorrent] About getting the info hash value from a .torrent file
hkucsfyp2005 at gmail.com
Tue Oct 25 03:34:58 EDT 2005
I have some silly question here.
I'm going to get the info hash from a .torrent file. From the specification.
the info hash is a 20-byte SHA1 hash of the *value* of the *info* key from
the Metainfo file.
Below is my content of the torrent.
Then I try to use sha1 algorithm to get the info hash from the torrent.
However, it seems that the result that i got from the algorithm is different
from the one that I got from BitComet or TorrentSpy. I am quite sure that my
algorithm is correct as I just used a sha 1
function from php.
When I look at the content inside the torrent.
I found some strange or weird characters after pieces40:. ie.
What are they ?
It seems that they are byte String . isn't it ?
How to convert those weird characters into readable characters ?
Do I need to convert those weird char into readable format before finding
the info hash value so that i can get a correct info hash value?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the BitTorrent