MD4: Difference between revisions

22 bytes added ,  1 year ago
m
→‎{{header|Perl}}: future-proof for 5.36, explicit :prototype
m (syntax highlighting fixup automation)
m (→‎{{header|Perl}}: future-proof for 5.36, explicit :prototype)
Line 1,267:
=={{header|Perl}}==
In-lining code from module [https://metacpan.org/pod/Digest::Perl::MD4 Digest::Perl::MD4], lightly edited for clarity.
<syntaxhighlight lang="perl">sub md4 :prototype(@) {
my @input = grep { defined && length > 0 } split /(.{64})/s, join '', @_;
push @input, '' if !@input || length($input[$#input]) >= 56;
Line 1,328:
}
 
sub md4_hex :prototype(@) { # convert to hexadecimal
unpack 'H*', &md4;
}
2,392

edits