#!/usr/bin/perl -w

use strict;
use Digest::SHA1;

foreach my $file (@ARGV) {

	my $ctx = Digest::SHA1->new;
	
	open IN, $file or die "Can't read $file:$!";
	my ($buf, $len);
	while($len = (read IN, $buf, 1024*1024) != 0) {
		$ctx->add($buf);
	}
	close IN;
	print $ctx->hexdigest . "\t" . $file ."\n";

}
