@@ -161,10 +161,10 @@ public override void Reset()
161161
162162 private void InitializeHashValue ( )
163163 {
164- _h1 = unchecked ( 0x67452301 ) ;
164+ _h1 = 0x67452301 ;
165165 _h2 = unchecked ( ( int ) 0xefcdab89 ) ;
166166 _h3 = unchecked ( ( int ) 0x98badcfe ) ;
167- _h4 = unchecked ( 0x10325476 ) ;
167+ _h4 = 0x10325476 ;
168168 }
169169
170170 private void Update ( byte input )
@@ -272,82 +272,82 @@ private void ProcessBlock()
272272 //
273273 // Round 1 - F cycle, 16 times.
274274 //
275- a = RotateLeft ( ( a + F ( b , c , d ) + _x [ 0 ] + unchecked ( ( int ) 0xd76aa478 ) ) , S11 ) + b ;
276- d = RotateLeft ( ( d + F ( a , b , c ) + _x [ 1 ] + unchecked ( ( int ) 0xe8c7b756 ) ) , S12 ) + a ;
277- c = RotateLeft ( ( c + F ( d , a , b ) + _x [ 2 ] + unchecked ( 0x242070db ) ) , S13 ) + d ;
278- b = RotateLeft ( ( b + F ( c , d , a ) + _x [ 3 ] + unchecked ( ( int ) 0xc1bdceee ) ) , S14 ) + c ;
279- a = RotateLeft ( ( a + F ( b , c , d ) + _x [ 4 ] + unchecked ( ( int ) 0xf57c0faf ) ) , S11 ) + b ;
280- d = RotateLeft ( ( d + F ( a , b , c ) + _x [ 5 ] + unchecked ( 0x4787c62a ) ) , S12 ) + a ;
281- c = RotateLeft ( ( c + F ( d , a , b ) + _x [ 6 ] + unchecked ( ( int ) 0xa8304613 ) ) , S13 ) + d ;
282- b = RotateLeft ( ( b + F ( c , d , a ) + _x [ 7 ] + unchecked ( ( int ) 0xfd469501 ) ) , S14 ) + c ;
283- a = RotateLeft ( ( a + F ( b , c , d ) + _x [ 8 ] + unchecked ( 0x698098d8 ) ) , S11 ) + b ;
284- d = RotateLeft ( ( d + F ( a , b , c ) + _x [ 9 ] + unchecked ( ( int ) 0x8b44f7af ) ) , S12 ) + a ;
285- c = RotateLeft ( ( c + F ( d , a , b ) + _x [ 10 ] + unchecked ( ( int ) 0xffff5bb1 ) ) , S13 ) + d ;
286- b = RotateLeft ( ( b + F ( c , d , a ) + _x [ 11 ] + unchecked ( ( int ) 0x895cd7be ) ) , S14 ) + c ;
287- a = RotateLeft ( ( a + F ( b , c , d ) + _x [ 12 ] + unchecked ( 0x6b901122 ) ) , S11 ) + b ;
288- d = RotateLeft ( ( d + F ( a , b , c ) + _x [ 13 ] + unchecked ( ( int ) 0xfd987193 ) ) , S12 ) + a ;
289- c = RotateLeft ( ( c + F ( d , a , b ) + _x [ 14 ] + unchecked ( ( int ) 0xa679438e ) ) , S13 ) + d ;
290- b = RotateLeft ( ( b + F ( c , d , a ) + _x [ 15 ] + unchecked ( 0x49b40821 ) ) , S14 ) + c ;
275+ a = RotateLeft ( a + F ( b , c , d ) + _x [ 0 ] + unchecked ( ( int ) 0xd76aa478 ) , S11 ) + b ;
276+ d = RotateLeft ( d + F ( a , b , c ) + _x [ 1 ] + unchecked ( ( int ) 0xe8c7b756 ) , S12 ) + a ;
277+ c = RotateLeft ( c + F ( d , a , b ) + _x [ 2 ] + 0x242070db , S13 ) + d ;
278+ b = RotateLeft ( b + F ( c , d , a ) + _x [ 3 ] + unchecked ( ( int ) 0xc1bdceee ) , S14 ) + c ;
279+ a = RotateLeft ( a + F ( b , c , d ) + _x [ 4 ] + unchecked ( ( int ) 0xf57c0faf ) , S11 ) + b ;
280+ d = RotateLeft ( d + F ( a , b , c ) + _x [ 5 ] + 0x4787c62a , S12 ) + a ;
281+ c = RotateLeft ( c + F ( d , a , b ) + _x [ 6 ] + unchecked ( ( int ) 0xa8304613 ) , S13 ) + d ;
282+ b = RotateLeft ( b + F ( c , d , a ) + _x [ 7 ] + unchecked ( ( int ) 0xfd469501 ) , S14 ) + c ;
283+ a = RotateLeft ( a + F ( b , c , d ) + _x [ 8 ] + 0x698098d8 , S11 ) + b ;
284+ d = RotateLeft ( d + F ( a , b , c ) + _x [ 9 ] + unchecked ( ( int ) 0x8b44f7af ) , S12 ) + a ;
285+ c = RotateLeft ( c + F ( d , a , b ) + _x [ 10 ] + unchecked ( ( int ) 0xffff5bb1 ) , S13 ) + d ;
286+ b = RotateLeft ( b + F ( c , d , a ) + _x [ 11 ] + unchecked ( ( int ) 0x895cd7be ) , S14 ) + c ;
287+ a = RotateLeft ( a + F ( b , c , d ) + _x [ 12 ] + 0x6b901122 , S11 ) + b ;
288+ d = RotateLeft ( d + F ( a , b , c ) + _x [ 13 ] + unchecked ( ( int ) 0xfd987193 ) , S12 ) + a ;
289+ c = RotateLeft ( c + F ( d , a , b ) + _x [ 14 ] + unchecked ( ( int ) 0xa679438e ) , S13 ) + d ;
290+ b = RotateLeft ( b + F ( c , d , a ) + _x [ 15 ] + 0x49b40821 , S14 ) + c ;
291291
292292 //
293293 // Round 2 - G cycle, 16 times.
294294 //
295- a = RotateLeft ( ( a + G ( b , c , d ) + _x [ 1 ] + unchecked ( ( int ) 0xf61e2562 ) ) , S21 ) + b ;
296- d = RotateLeft ( ( d + G ( a , b , c ) + _x [ 6 ] + unchecked ( ( int ) 0xc040b340 ) ) , S22 ) + a ;
297- c = RotateLeft ( ( c + G ( d , a , b ) + _x [ 11 ] + unchecked ( 0x265e5a51 ) ) , S23 ) + d ;
298- b = RotateLeft ( ( b + G ( c , d , a ) + _x [ 0 ] + unchecked ( ( int ) 0xe9b6c7aa ) ) , S24 ) + c ;
299- a = RotateLeft ( ( a + G ( b , c , d ) + _x [ 5 ] + unchecked ( ( int ) 0xd62f105d ) ) , S21 ) + b ;
300- d = RotateLeft ( ( d + G ( a , b , c ) + _x [ 10 ] + unchecked ( 0x02441453 ) ) , S22 ) + a ;
301- c = RotateLeft ( ( c + G ( d , a , b ) + _x [ 15 ] + unchecked ( ( int ) 0xd8a1e681 ) ) , S23 ) + d ;
302- b = RotateLeft ( ( b + G ( c , d , a ) + _x [ 4 ] + unchecked ( ( int ) 0xe7d3fbc8 ) ) , S24 ) + c ;
303- a = RotateLeft ( ( a + G ( b , c , d ) + _x [ 9 ] + unchecked ( 0x21e1cde6 ) ) , S21 ) + b ;
304- d = RotateLeft ( ( d + G ( a , b , c ) + _x [ 14 ] + unchecked ( ( int ) 0xc33707d6 ) ) , S22 ) + a ;
305- c = RotateLeft ( ( c + G ( d , a , b ) + _x [ 3 ] + unchecked ( ( int ) 0xf4d50d87 ) ) , S23 ) + d ;
306- b = RotateLeft ( ( b + G ( c , d , a ) + _x [ 8 ] + unchecked ( 0x455a14ed ) ) , S24 ) + c ;
307- a = RotateLeft ( ( a + G ( b , c , d ) + _x [ 13 ] + unchecked ( ( int ) 0xa9e3e905 ) ) , S21 ) + b ;
308- d = RotateLeft ( ( d + G ( a , b , c ) + _x [ 2 ] + unchecked ( ( int ) 0xfcefa3f8 ) ) , S22 ) + a ;
309- c = RotateLeft ( ( c + G ( d , a , b ) + _x [ 7 ] + unchecked ( 0x676f02d9 ) ) , S23 ) + d ;
310- b = RotateLeft ( ( b + G ( c , d , a ) + _x [ 12 ] + unchecked ( ( int ) 0x8d2a4c8a ) ) , S24 ) + c ;
295+ a = RotateLeft ( a + G ( b , c , d ) + _x [ 1 ] + unchecked ( ( int ) 0xf61e2562 ) , S21 ) + b ;
296+ d = RotateLeft ( d + G ( a , b , c ) + _x [ 6 ] + unchecked ( ( int ) 0xc040b340 ) , S22 ) + a ;
297+ c = RotateLeft ( c + G ( d , a , b ) + _x [ 11 ] + 0x265e5a51 , S23 ) + d ;
298+ b = RotateLeft ( b + G ( c , d , a ) + _x [ 0 ] + unchecked ( ( int ) 0xe9b6c7aa ) , S24 ) + c ;
299+ a = RotateLeft ( a + G ( b , c , d ) + _x [ 5 ] + unchecked ( ( int ) 0xd62f105d ) , S21 ) + b ;
300+ d = RotateLeft ( d + G ( a , b , c ) + _x [ 10 ] + 0x02441453 , S22 ) + a ;
301+ c = RotateLeft ( c + G ( d , a , b ) + _x [ 15 ] + unchecked ( ( int ) 0xd8a1e681 ) , S23 ) + d ;
302+ b = RotateLeft ( b + G ( c , d , a ) + _x [ 4 ] + unchecked ( ( int ) 0xe7d3fbc8 ) , S24 ) + c ;
303+ a = RotateLeft ( a + G ( b , c , d ) + _x [ 9 ] + 0x21e1cde6 , S21 ) + b ;
304+ d = RotateLeft ( d + G ( a , b , c ) + _x [ 14 ] + unchecked ( ( int ) 0xc33707d6 ) , S22 ) + a ;
305+ c = RotateLeft ( c + G ( d , a , b ) + _x [ 3 ] + unchecked ( ( int ) 0xf4d50d87 ) , S23 ) + d ;
306+ b = RotateLeft ( b + G ( c , d , a ) + _x [ 8 ] + 0x455a14ed , S24 ) + c ;
307+ a = RotateLeft ( a + G ( b , c , d ) + _x [ 13 ] + unchecked ( ( int ) 0xa9e3e905 ) , S21 ) + b ;
308+ d = RotateLeft ( d + G ( a , b , c ) + _x [ 2 ] + unchecked ( ( int ) 0xfcefa3f8 ) , S22 ) + a ;
309+ c = RotateLeft ( c + G ( d , a , b ) + _x [ 7 ] + 0x676f02d9 , S23 ) + d ;
310+ b = RotateLeft ( b + G ( c , d , a ) + _x [ 12 ] + unchecked ( ( int ) 0x8d2a4c8a ) , S24 ) + c ;
311311
312312 //
313313 // Round 3 - H cycle, 16 times.
314314 //
315- a = RotateLeft ( ( a + H ( b , c , d ) + _x [ 5 ] + unchecked ( ( int ) 0xfffa3942 ) ) , S31 ) + b ;
316- d = RotateLeft ( ( d + H ( a , b , c ) + _x [ 8 ] + unchecked ( ( int ) 0x8771f681 ) ) , S32 ) + a ;
317- c = RotateLeft ( ( c + H ( d , a , b ) + _x [ 11 ] + unchecked ( 0x6d9d6122 ) ) , S33 ) + d ;
318- b = RotateLeft ( ( b + H ( c , d , a ) + _x [ 14 ] + unchecked ( ( int ) 0xfde5380c ) ) , S34 ) + c ;
319- a = RotateLeft ( ( a + H ( b , c , d ) + _x [ 1 ] + unchecked ( ( int ) 0xa4beea44 ) ) , S31 ) + b ;
320- d = RotateLeft ( ( d + H ( a , b , c ) + _x [ 4 ] + unchecked ( 0x4bdecfa9 ) ) , S32 ) + a ;
321- c = RotateLeft ( ( c + H ( d , a , b ) + _x [ 7 ] + unchecked ( ( int ) 0xf6bb4b60 ) ) , S33 ) + d ;
322- b = RotateLeft ( ( b + H ( c , d , a ) + _x [ 10 ] + unchecked ( ( int ) 0xbebfbc70 ) ) , S34 ) + c ;
323- a = RotateLeft ( ( a + H ( b , c , d ) + _x [ 13 ] + unchecked ( 0x289b7ec6 ) ) , S31 ) + b ;
324- d = RotateLeft ( ( d + H ( a , b , c ) + _x [ 0 ] + unchecked ( ( int ) 0xeaa127fa ) ) , S32 ) + a ;
325- c = RotateLeft ( ( c + H ( d , a , b ) + _x [ 3 ] + unchecked ( ( int ) 0xd4ef3085 ) ) , S33 ) + d ;
326- b = RotateLeft ( ( b + H ( c , d , a ) + _x [ 6 ] + unchecked ( 0x04881d05 ) ) , S34 ) + c ;
327- a = RotateLeft ( ( a + H ( b , c , d ) + _x [ 9 ] + unchecked ( ( int ) 0xd9d4d039 ) ) , S31 ) + b ;
328- d = RotateLeft ( ( d + H ( a , b , c ) + _x [ 12 ] + unchecked ( ( int ) 0xe6db99e5 ) ) , S32 ) + a ;
329- c = RotateLeft ( ( c + H ( d , a , b ) + _x [ 15 ] + unchecked ( 0x1fa27cf8 ) ) , S33 ) + d ;
330- b = RotateLeft ( ( b + H ( c , d , a ) + _x [ 2 ] + unchecked ( ( int ) 0xc4ac5665 ) ) , S34 ) + c ;
315+ a = RotateLeft ( a + H ( b , c , d ) + _x [ 5 ] + unchecked ( ( int ) 0xfffa3942 ) , S31 ) + b ;
316+ d = RotateLeft ( d + H ( a , b , c ) + _x [ 8 ] + unchecked ( ( int ) 0x8771f681 ) , S32 ) + a ;
317+ c = RotateLeft ( c + H ( d , a , b ) + _x [ 11 ] + 0x6d9d6122 , S33 ) + d ;
318+ b = RotateLeft ( b + H ( c , d , a ) + _x [ 14 ] + unchecked ( ( int ) 0xfde5380c ) , S34 ) + c ;
319+ a = RotateLeft ( a + H ( b , c , d ) + _x [ 1 ] + unchecked ( ( int ) 0xa4beea44 ) , S31 ) + b ;
320+ d = RotateLeft ( d + H ( a , b , c ) + _x [ 4 ] + 0x4bdecfa9 , S32 ) + a ;
321+ c = RotateLeft ( c + H ( d , a , b ) + _x [ 7 ] + unchecked ( ( int ) 0xf6bb4b60 ) , S33 ) + d ;
322+ b = RotateLeft ( b + H ( c , d , a ) + _x [ 10 ] + unchecked ( ( int ) 0xbebfbc70 ) , S34 ) + c ;
323+ a = RotateLeft ( a + H ( b , c , d ) + _x [ 13 ] + 0x289b7ec6 , S31 ) + b ;
324+ d = RotateLeft ( d + H ( a , b , c ) + _x [ 0 ] + unchecked ( ( int ) 0xeaa127fa ) , S32 ) + a ;
325+ c = RotateLeft ( c + H ( d , a , b ) + _x [ 3 ] + unchecked ( ( int ) 0xd4ef3085 ) , S33 ) + d ;
326+ b = RotateLeft ( b + H ( c , d , a ) + _x [ 6 ] + 0x04881d05 , S34 ) + c ;
327+ a = RotateLeft ( a + H ( b , c , d ) + _x [ 9 ] + unchecked ( ( int ) 0xd9d4d039 ) , S31 ) + b ;
328+ d = RotateLeft ( d + H ( a , b , c ) + _x [ 12 ] + unchecked ( ( int ) 0xe6db99e5 ) , S32 ) + a ;
329+ c = RotateLeft ( c + H ( d , a , b ) + _x [ 15 ] + 0x1fa27cf8 , S33 ) + d ;
330+ b = RotateLeft ( b + H ( c , d , a ) + _x [ 2 ] + unchecked ( ( int ) 0xc4ac5665 ) , S34 ) + c ;
331331
332332 //
333333 // Round 4 - K cycle, 16 times.
334334 //
335- a = RotateLeft ( ( a + K ( b , c , d ) + _x [ 0 ] + unchecked ( ( int ) 0xf4292244 ) ) , S41 ) + b ;
336- d = RotateLeft ( ( d + K ( a , b , c ) + _x [ 7 ] + unchecked ( 0x432aff97 ) ) , S42 ) + a ;
337- c = RotateLeft ( ( c + K ( d , a , b ) + _x [ 14 ] + unchecked ( ( int ) 0xab9423a7 ) ) , S43 ) + d ;
338- b = RotateLeft ( ( b + K ( c , d , a ) + _x [ 5 ] + unchecked ( ( int ) 0xfc93a039 ) ) , S44 ) + c ;
339- a = RotateLeft ( ( a + K ( b , c , d ) + _x [ 12 ] + unchecked ( 0x655b59c3 ) ) , S41 ) + b ;
340- d = RotateLeft ( ( d + K ( a , b , c ) + _x [ 3 ] + unchecked ( ( int ) 0x8f0ccc92 ) ) , S42 ) + a ;
341- c = RotateLeft ( ( c + K ( d , a , b ) + _x [ 10 ] + unchecked ( ( int ) 0xffeff47d ) ) , S43 ) + d ;
342- b = RotateLeft ( ( b + K ( c , d , a ) + _x [ 1 ] + unchecked ( ( int ) 0x85845dd1 ) ) , S44 ) + c ;
343- a = RotateLeft ( ( a + K ( b , c , d ) + _x [ 8 ] + unchecked ( 0x6fa87e4f ) ) , S41 ) + b ;
344- d = RotateLeft ( ( d + K ( a , b , c ) + _x [ 15 ] + unchecked ( ( int ) 0xfe2ce6e0 ) ) , S42 ) + a ;
345- c = RotateLeft ( ( c + K ( d , a , b ) + _x [ 6 ] + unchecked ( ( int ) 0xa3014314 ) ) , S43 ) + d ;
346- b = RotateLeft ( ( b + K ( c , d , a ) + _x [ 13 ] + unchecked ( 0x4e0811a1 ) ) , S44 ) + c ;
347- a = RotateLeft ( ( a + K ( b , c , d ) + _x [ 4 ] + unchecked ( ( int ) 0xf7537e82 ) ) , S41 ) + b ;
348- d = RotateLeft ( ( d + K ( a , b , c ) + _x [ 11 ] + unchecked ( ( int ) 0xbd3af235 ) ) , S42 ) + a ;
349- c = RotateLeft ( ( c + K ( d , a , b ) + _x [ 2 ] + unchecked ( 0x2ad7d2bb ) ) , S43 ) + d ;
350- b = RotateLeft ( ( b + K ( c , d , a ) + _x [ 9 ] + unchecked ( ( int ) 0xeb86d391 ) ) , S44 ) + c ;
335+ a = RotateLeft ( a + K ( b , c , d ) + _x [ 0 ] + unchecked ( ( int ) 0xf4292244 ) , S41 ) + b ;
336+ d = RotateLeft ( d + K ( a , b , c ) + _x [ 7 ] + 0x432aff97 , S42 ) + a ;
337+ c = RotateLeft ( c + K ( d , a , b ) + _x [ 14 ] + unchecked ( ( int ) 0xab9423a7 ) , S43 ) + d ;
338+ b = RotateLeft ( b + K ( c , d , a ) + _x [ 5 ] + unchecked ( ( int ) 0xfc93a039 ) , S44 ) + c ;
339+ a = RotateLeft ( a + K ( b , c , d ) + _x [ 12 ] + 0x655b59c3 , S41 ) + b ;
340+ d = RotateLeft ( d + K ( a , b , c ) + _x [ 3 ] + unchecked ( ( int ) 0x8f0ccc92 ) , S42 ) + a ;
341+ c = RotateLeft ( c + K ( d , a , b ) + _x [ 10 ] + unchecked ( ( int ) 0xffeff47d ) , S43 ) + d ;
342+ b = RotateLeft ( b + K ( c , d , a ) + _x [ 1 ] + unchecked ( ( int ) 0x85845dd1 ) , S44 ) + c ;
343+ a = RotateLeft ( a + K ( b , c , d ) + _x [ 8 ] + 0x6fa87e4f , S41 ) + b ;
344+ d = RotateLeft ( d + K ( a , b , c ) + _x [ 15 ] + unchecked ( ( int ) 0xfe2ce6e0 ) , S42 ) + a ;
345+ c = RotateLeft ( c + K ( d , a , b ) + _x [ 6 ] + unchecked ( ( int ) 0xa3014314 ) , S43 ) + d ;
346+ b = RotateLeft ( b + K ( c , d , a ) + _x [ 13 ] + 0x4e0811a1 , S44 ) + c ;
347+ a = RotateLeft ( a + K ( b , c , d ) + _x [ 4 ] + unchecked ( ( int ) 0xf7537e82 ) , S41 ) + b ;
348+ d = RotateLeft ( d + K ( a , b , c ) + _x [ 11 ] + unchecked ( ( int ) 0xbd3af235 ) , S42 ) + a ;
349+ c = RotateLeft ( c + K ( d , a , b ) + _x [ 2 ] + 0x2ad7d2bb , S43 ) + d ;
350+ b = RotateLeft ( b + K ( c , d , a ) + _x [ 9 ] + unchecked ( ( int ) 0xeb86d391 ) , S44 ) + c ;
351351
352352 _h1 += a ;
353353 _h2 += b ;
0 commit comments