i := 0
for ; i < 16 ; i ++ {
f := b &c | (^b )&d
t := bits .RotateLeft32 (a , 5 ) + f + e + w [i &0xf ] + _K0
a , b , c , d , e = t , a , bits .RotateLeft32 (b , 30 ), c , d
}
for ; i < 20 ; i ++ {
tmp := w [(i -3 )&0xf ] ^ w [(i -8 )&0xf ] ^ w [(i -14 )&0xf ] ^ w [(i )&0xf ]
w [i &0xf ] = tmp <<1 | tmp >>(32 -1 )
f := b &c | (^b )&d
t := bits .RotateLeft32 (a , 5 ) + f + e + w [i &0xf ] + _K0
a , b , c , d , e = t , a , bits .RotateLeft32 (b , 30 ), c , d
}
for ; i < 40 ; i ++ {
tmp := w [(i -3 )&0xf ] ^ w [(i -8 )&0xf ] ^ w [(i -14 )&0xf ] ^ w [(i )&0xf ]
w [i &0xf ] = tmp <<1 | tmp >>(32 -1 )
f := b ^ c ^ d
t := bits .RotateLeft32 (a , 5 ) + f + e + w [i &0xf ] + _K1
a , b , c , d , e = t , a , bits .RotateLeft32 (b , 30 ), c , d
}
for ; i < 60 ; i ++ {
tmp := w [(i -3 )&0xf ] ^ w [(i -8 )&0xf ] ^ w [(i -14 )&0xf ] ^ w [(i )&0xf ]
w [i &0xf ] = tmp <<1 | tmp >>(32 -1 )
f := ((b | c ) & d ) | (b & c )
t := bits .RotateLeft32 (a , 5 ) + f + e + w [i &0xf ] + _K2
a , b , c , d , e = t , a , bits .RotateLeft32 (b , 30 ), c , d
}
for ; i < 80 ; i ++ {
tmp := w [(i -3 )&0xf ] ^ w [(i -8 )&0xf ] ^ w [(i -14 )&0xf ] ^ w [(i )&0xf ]
w [i &0xf ] = tmp <<1 | tmp >>(32 -1 )
f := b ^ c ^ d
t := bits .RotateLeft32 (a , 5 ) + f + e + w [i &0xf ] + _K3
a , b , c , d , e = t , a , bits .RotateLeft32 (b , 30 ), c , d
}
h0 += a
h1 += b
h2 += c
h3 += d
h4 += e
p = p [chunk :]
}
dig .h [0 ], dig .h [1 ], dig .h [2 ], dig .h [3 ], dig .h [4 ] = h0 , h1 , h2 , h3 , h4