RIPEMD-160: Difference between revisions
→{{header|Raku}}: FP style (should also be faster)
(→{{header|Mathematica}}/{{header|Wolfram Language}}: use correct sample string) |
(→{{header|Raku}}: FP style (should also be faster)) |
||
Line 1,290:
$b.push: |(8 * $data).polymod: 256 xx 7;
blob8.new: (
my blob32 $word .= new: $b.rotor(4).map: { :256[@^x.reverse] };▼
my buf32 $h .= new: 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0;▼
-> blob32 $h, @words {
-> [$X,
}, blob32.new($h).clone xx 2, |^80;
▲ }
blob32.new:
},
return blob8.new: $h.map: |*.polymod: 256 xx 3;▼
}</syntaxhighlight>
|