SHA-256: Difference between revisions
Content added Content deleted
(→{{header|Perl 6}}: using the new polymod function) |
m (→{{header|Perl 6}}: minor simplification) |
||
Line 1,051: | Line 1,051: | ||
multi sha256(Blob $data) { |
multi sha256(Blob $data) { |
||
constant K = init(* **(1/3))[^64]; |
constant K = init(* **(1/3))[^64]; |
||
my @b = $data.list, 0x80; |
|||
push @b, 0 until (8 * @b - 448) %% 512; |
|||
⚫ | |||
⚫ | |||
my @word = :256[@b.shift xx 4] xx @b/4; |
my @word = :256[@b.shift xx 4] xx @b/4; |
||