title: Why is my SHA1 hash not matching?
body: <p>I don't think I was specific enough last time. Here we go:</p>
  <p>I have a hex string:</p>
  <blockquote>
  <p>742713478fb3c36e014d004100440041004
  e0041004e00000060f347d15798c9010060
  6b899c5a98c9014d007900470072006f007
  500700000002f0000001f7691944b9a3306
  295fb5f1f57ca52090d35b50060606060606</p>
  </blockquote>
  <p>The last 20 bytes should (theoretically) contain a SHA1 Hash of the first part (complete string - 20 bytes). But it doesn't match for me.</p>
  <p>Trying to do this with PHP, but no luck. Can you get a match?</p>
  <h3>Ticket:</h3>
  <blockquote>
  <p>742713478fb3c36e014d004100
  440041004e0041004e00000060
  f347d15798c90100606b899c5a
  98c9014d007900470072006f00
  7500700000002f0000001f7691944b9a</p>
  </blockquote>
  <h3>sha1 hash of ticket appended to original:</h3>
  <blockquote>
  <p>3306295fb5f1f57ca52090d35b50060606060606</p>
  </blockquote>
  <h3>My sha1 hash of ticket:</h3>
  <blockquote>
  <p>b6ecd613698ac3533b5f853bf22f6eb4afb94239</p>
  </blockquote>
  <p>Here's what is in the ticket and how it's being stored. FWIW, I can pull out username, etc, and spot the various delimiters.
  <a href="http://www.codeproject.com/KB/aspnet/Forms_Auth_Internals/AuthTicket2.JPG" rel="nofollow noreferrer">http://www.codeproject.com/KB/aspnet/Forms_Auth_Internals/AuthTicket2.JPG</a></p>
  <p>Edited: I have discovered that the string is padded on the end by the decryption function it goes through before this point. I removed the last 6 bytes and adjusted by ticket and hash accordingly. Still doesn't work, but I'm closer.</p>