diff options
Diffstat (limited to 'mini-dinstall')
| -rwxr-xr-x | mini-dinstall | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mini-dinstall b/mini-dinstall index 92f3831..f3fc6d7 100755 --- a/mini-dinstall +++ b/mini-dinstall @@ -1172,14 +1172,14 @@ class ArchiveDirIndexer(threading.Thread): buf = f.read(8192) return shasum.hexdigest() elif type == 'sha256': - import Crypto.Hash.SHA256 + from Crypto.Hash import SHA256 f = open(filename) buf = f.read(8192) - shasum256 = SHA256.new(buf) + shasum256 = SHA256.new() while buf != '': - shasum256.hash_update(buf) + shasum256.update(buf) buf = f.read(8192) - return shasum256.hash_digest() + return shasum256.hexdigest() else: raise DinstallException('cannot compute hash of type %s; no builtin method or /usr/bin/%ssum', type, type) |
