MD5/Implementation: Difference between revisions

→‎{{header|11l}}: support `--int64` option
(→‎{{header|11l}}: support `--int64` option)
Line 41:
init_values = (UInt32(6745'2301), UInt32(EFCD'AB89), UInt32(98BA'DCFE), UInt32(1032'5476))
 
[((IntUInt32, IntUInt32, IntUInt32) -> IntUInt32)] functions
functions [+]= (b, c, d) -> (b [&] c) [|] ((-)b [&] d)
functions [+]= (b, c, d) -> (d [&] b) [|] ((-)d [&] c)
Line 47:
functions [+]= (b, c, d) -> c (+) (b [|] (-)d)
 
[(IntUInt32 -> IntUInt32)] index_functions
index_functions [+]= i -> i
index_functions [+]= i -> (5 * i + 1) % 16
Line 68:
V f = :functions[i I/ 16](b, c, d)
V g = :index_functions[i I/ 16](i)
V to_rotate = a + f + :constants[i] + IntUInt32(bytes' chunk[4 * g .+ 4])
V new_b = UInt32(b + rotl(to_rotate, :rotate_amounts[i]))
(a, b, c, d) = (d, new_b, b, c)
1,481

edits