Skip to content

Commit

Permalink
test-digests.sh: add Perl digest examples
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Kujau <[email protected]>
  • Loading branch information
ckujau committed Feb 7, 2020
1 parent aeb13a8 commit 7ba5642
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion benchmarks/test-digests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ for d in md5 sha1 sha224 sha256 sha384 sha512 ripemd160; do
echo "TEST: coreutils / DIGEST: $d / SKIPPED"
fi

# Perl's shasum only understands SHA variants
# Perl's shasum only understands SHA variants.
# FIXME: that's not true, at all -- we could just use the installed
# modules directly, like:
# > perl -le 'use Digest::SHA qw(sha1_hex); print sha1_hex(<>);'
# > perl -le 'use Digest::MD5 qw(md5_hex); print md5_hex(<>);'
# > perl -le 'use Digest::SHA qw(sha256_hex); print sha256_hex(<>);'
# > perl -le 'use Digest::SHA3 qw(sha3_256_hex); print sha3_256_hex(<>);'
case $d in
sha*)
# Remove the "sha" prefix from the digest names
Expand Down

0 comments on commit 7ba5642

Please sign in to comment.