Why doesn't my SHA1 hash match?

I don't think the last time I was specific enough. Here we go:

I have a hexadecimal string:

742713478fb3c36e014d004100440041004 e0041004e00000060f347d15798c9010060 6b899c5a98c9014d007900470072006f007 500700000002f0000001f7691944b9a3306 295fb5f606060a

The last 20 bytes should (theoretically) contain the SHA1 Hash of the first part (the full string is 20 bytes). But that does not fit me.

Trying to do this with PHP, but no luck. Can you get a match?

Ticket:

742713478fb3c36e014d004100 440041004e0041004e00000060 f347d15798c90100606b899c5a 98c9014d007900470072006f00 7500700000002f0000001f7691944b9a

sha1 ticket hash attached to the original:

3306295fb5f1f57ca52090d35b5006060606060606

My sha1 ticket hash:

b6ecd613698ac3533b5f853bf22f6eb4afb94239

. FWIW, .. . http://www.codeproject.com/KB/aspnet/Forms_Auth_Internals/AuthTicket2.JPG

: , , . 6 . , .

+3
5

. , ?

+5

, .

php . sha1, PHP, 40- (40-) 20- , .

, , , , , .

+4

, , .

+2

SHA1 ( )

b6ecd613698ac3533b5f853bf22f6eb4afb94239

: , PHP.

+1

The problem was that the original was a hash key. I had to use hash_hmac () instead of the verification key, not sha1 ().

+1
source

Source: https://habr.com/ru/post/1704140/


All Articles