Skip to content

Commit

Permalink
Do not insist on Digest::SHA in Apk.pm
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Jan 20, 2025
1 parent fba71af commit f99ca41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Build/Apk.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ package Build::Apk;
use strict;

use Digest::MD5;
use Digest::SHA;

eval { require Archive::Tar };
*Archive::Tar::new = sub {die("Archive::Tar is not available\n")} unless defined &Archive::Tar::new;
Expand Down Expand Up @@ -614,6 +613,7 @@ sub calcapkchksum {
$section = $section eq 'sig' ? 0 : $section eq 'ctrl' ? 1 : 2;
my $fd;
open($fd, '<', $handle) or die("$handle: $!\n");
require Digest::SHA;
my $ctx;
$ctx = Digest::SHA->new(1) if $type eq 'Q1' || $type eq 'X1' || $type eq 'sha1';
$ctx = Digest::SHA->new(256) if $type eq 'Q2' || $type eq 'X2' || $type eq 'sha256';
Expand Down

0 comments on commit f99ca41

Please sign in to comment.