hash - How does this function compare hexnumbers? -


var int a0 := 0x67452301   //a var int b0 := 0xefcdab89   //b var int c0 := 0x98badcfe   //c var int d0 := 0x10325476   //d      each 512-bit chunk of message         break chunk sixteen 32-bit words m[j], 0 ≤ j ≤ 15     //initialize hash value chunk:         var int := a0         var int b := b0         var int c := c0         var int d := d0     //main loop:         0 63             if 0 ≤ ≤ 15                 f := (b , c) or ((not b) , d)                 g :=             else if 16 ≤ ≤ 31                 f := (d , b) or ((not d) , c)                 g := (5×i + 1) mod 16             else if 32 ≤ ≤ 47                 f := b xor c xor d                 g := (3×i + 5) mod 16             else if 48 ≤ ≤ 63                 f := c xor (b or (not d))                 g := (7×i) mod 16             dtemp := d             d := c             c := b             b := b + leftrotate((a + f + k[i] + m[g]), s[i])             := dtemp         end     //add chunk's hash result far:         a0 := a0 +         b0 := b0 + b         c0 := c0 + c         d0 := d0 + d     end 

this taken wikipedia, here, see full code.

i fail understand example (b , c) produces, b , c hexes. (big endian)

b , c bitwise (32bit) boolean , operation. example int 15 (0xf) , 17 (0x11) result in 1 (0x1).

the representation of numbers (hex or decimal) on output/input has nothing operations on them. actual result 4 32bit integers concatenated - typically printed as single large hex string.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -