diff options
Diffstat (limited to 'FuseArchive')
-rw-r--r-- | FuseArchive/Storage/FileSystem.py | 5 | ||||
-rw-r--r-- | FuseArchive/Storage/ZipFile.py | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/FuseArchive/Storage/FileSystem.py b/FuseArchive/Storage/FileSystem.py index b5d5222..4709e1a 100644 --- a/FuseArchive/Storage/FileSystem.py +++ b/FuseArchive/Storage/FileSystem.py @@ -1,4 +1,5 @@ -import FuseArchive, logging, os, sha, sys +import FuseArchive, logging, os, sys +import FuseArchive.Digest from binascii import hexlify from FuseArchive.Chunk import Chunk @@ -59,7 +60,7 @@ def save_chunk( chunk ): logging.debug( "Chunk: %s" + hexlify( chunk ) ) # Save this hash string, similar to the backuppc algo - digest = sha.new( chunk ).digest() + digest = FuseArchive.Digest.compute( chunk ) # Write out our chunk chars = list( digest ) diff --git a/FuseArchive/Storage/ZipFile.py b/FuseArchive/Storage/ZipFile.py index 83898ef..486ee39 100644 --- a/FuseArchive/Storage/ZipFile.py +++ b/FuseArchive/Storage/ZipFile.py @@ -1,4 +1,5 @@ -import os, logging, FuseArchive, zipfile, sha +import os, logging, FuseArchive, zipfile +import FuseArchive.Digest from binascii import hexlify def save_chunk( chunk ): @@ -10,7 +11,7 @@ def save_chunk( chunk ): logging.debug( "Chunk: %s" + hexlify( chunk ) ) # Save this hash string, similar to the backuppc algo - digest = sha.new( chunk ).digest() + digest = FuseArchive.Digest.comput( chunk ) # Write out our chunk chars = list( digest ) |