aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcheckem6
1 files changed, 5 insertions, 1 deletions
diff --git a/checkem b/checkem
index 8a9a90c..1f2dec9 100755
--- a/checkem
+++ b/checkem
@@ -22,6 +22,9 @@ use strict;
# Get the find and current working directory modules.
use File::Find;
use Cwd;
+use Digest::SHA;
+
+my $sha = Digest::SHA->new('sha256');
# Initialise global directory name scalar.
my $dir;
@@ -64,7 +67,8 @@ sub inode {
# Declare a sub that returns checksums.
sub checksum {
my $file = shift;
- return substr(`md5sum "$file"`, 0, 32);
+ $sha->addfile($file);
+ return $sha->hexdigest();
}
# Declare the wanted sub ...