use strict;
use warnings;
+use Digest::SHA;
use File::Spec;
use HTML::Entities qw();
use URI::Escape;
print INDEX encode_entities ($p->{NAME}), ": " if defined ($p->{NAME});
print INDEX "<a href=\"", encode_entities ($p->{HREF}), "\">";
print INDEX encode_entities ($p->{PRODUCT});
- print INDEX "</a></li>\n";
+ print INDEX "</a>\n";
+ if ($p->{PRODUCT} =~ /\.tar\.gz$/) {
+ my $sha = Digest::SHA->new(1);
+ $sha->addfile($p->{PRODUCT});
+ print INDEX "<br>sha1: ", $sha->hexdigest, "\n";
+
+ $sha = Digest::SHA->new(256);
+ $sha->addfile($p->{PRODUCT});
+ print INDEX "<br>sha256: ", $sha->hexdigest, "\n";
+ }
+ print INDEX "</li>\n";
}
print INDEX "</ul>\n";