/usr/share/doc/libdigest-jhash-perl/examples/jhash.pl is in libdigest-jhash-perl 0.09-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #!/usr/bin/perl -w
use strict;
use Digest::JHash 'jhash';
if ($ARGV[0]) {
if ( -f $ARGV[0] ) {
local $/;
open F, $ARGV[0] or die "Can't read $ARGV[0] $!\n";
my $data = <F>;
close F;
printf "File: $ARGV[0] => %u\n", jhash($data);
}
else {
printf "String: $ARGV[0] => %u\n", jhash($ARGV[0]);
}
}
else {
print "Usage $0 <file or string>\n";
}
|