title: Translating info_hash in the announce request of a torrent in PHP
body: <p>I'm having an issue to understand how can I &quot;translate&quot; the info_hash value to a real hash.
  Here's an example of what I'm getting from uTorrent when it's announcing to my tracker:</p>
  <pre><code>{
  passkey: &quot;77ec6a27adcc441648d66d0b873550e4&quot;,
  info_hash: &quot;YNvÿ@p&quot;,
  peer_id: &quot;-UT3430-89 &quot;,
  port: &quot;54790&quot;,
  uploaded: &quot;0&quot;,
  downloaded: &quot;491520&quot;,
  left: &quot;24928863&quot;,
  corrupt: &quot;0&quot;,
  key: &quot;A2DD5E96&quot;,
  numwant: &quot;200&quot;,
  compact: &quot;1&quot;,
  no_peer_id: &quot;1&quot;
  }
  </code></pre>
  <p>What I'm trying to understand is how do I take this strange value: &quot;YNvÿ@p&quot; and get the info hash as sha1 (like: 594E98760099B1CFC3BFAA4070C0CC02F6C1AA90)?
  I'm using PHP on my server.</p>
  <p>Now I've read already the following statements:</p>
  <blockquote>
  <p>info_hash</p>
  <p>The 20 byte sha1 hash of the bencoded form of the info value from the metainfo file. Note that this is a substring of the metainfo file. The info-hash must be the hash of the encoded form as found in the .torrent file, regardless of it being invalid. This value will almost certainly have to be escaped.</p>
  </blockquote>
  <p>But it didn't help me much to understand what's going on.</p>