MD5/Implementation: Difference between revisions
Content added Content deleted
(→{{header|Raku}}: modernize and fix) |
m (→{{header|Raku}}: minor style fixes) |
||
Line 4,727: | Line 4,727: | ||
sub md5-block(blob32 $H where $H == 4, blob32 $X where $X == 16) |
sub md5-block(blob32 $H where $H == 4, blob32 $X where $X == 16) |
||
{ |
{ |
||
blob32.new: $H[] Z+md5.raku |
blob32.new: $H[] Z+ md5.raku |
||
reduce -> blob32 $b, $i { |
reduce -> blob32 $b, $i { |
||
blob32.new: |
blob32.new: |
||
Line 4,739: | Line 4,739: | ||
sub md5(Blob $msg --> blob8) |
sub md5(Blob $msg --> blob8) |
||
{ |
{ |
||
blob8.new: little-endian 8, 4, |
blob8.new: little-endian 8, 4, |
||
reduce &md5-block, |
|reduce &md5-block, |
||
(constant $ = blob32.new: 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476), |
(constant $ = blob32.new: 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476), |
||
|md5-pad $msg; |
|md5-pad $msg; |