diff options
Diffstat (limited to 'portage/chksum/sha1hash.py')
-rw-r--r-- | portage/chksum/sha1hash.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/portage/chksum/sha1hash.py b/portage/chksum/sha1hash.py deleted file mode 100644 index 0283edb..0000000 --- a/portage/chksum/sha1hash.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright: 2004-2005 Gentoo Foundation -# License: GPL2 -# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/portage/chksum/sha1hash.py,v 1.2 2005/07/13 05:51:35 ferringb Exp $ - -import sha - -def sha1hash(filename, chksum): - f = open(filename, 'rb') - blocksize=32768 - data = f.read(blocksize) - size = 0L - sum = sha.new() - while data: - sum.update(data) - size = size + len(data) - data = f.read(blocksize) - f.close() - - return sum.hexdigest() == chksum - -chksum_types = (("sha1", sha1hash),) |