]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blobdiff - src/allmydata/upload.py
switch from base62 to base32 for storage indices, switch from z-base-32 to rfc 3548...
[tahoe-lafs/tahoe-lafs.git] / src / allmydata / upload.py
index 7ff7b3ef226439c0d945b8e25a19d61b18fa6113..8d7a633923387a859832273ff9521ae3f12a3150 100644 (file)
@@ -13,7 +13,7 @@ from allmydata.util.hashutil import file_renewal_secret_hash, \
      bucket_cancel_secret_hash, plaintext_hasher, \
      storage_index_hash, plaintext_segment_hasher, content_hash_key_hasher
 from allmydata import encode, storage, hashtree, uri
-from allmydata.util import idlib, mathutil
+from allmydata.util import base32, idlib, mathutil
 from allmydata.util.assertutil import precondition
 from allmydata.interfaces import IUploadable, IUploader, IUploadResults, \
      IEncryptedUploadable, RIEncryptedUploadable, IUploadStatus
@@ -448,7 +448,7 @@ class EncryptAnUploadable:
                          level=log.NOISY)
                 self.log(format="plaintext leaf hash [%(segnum)d] is %(hash)s",
                          segnum=len(self._plaintext_segment_hashes)-1,
-                         hash=idlib.b2a(p.digest()),
+                         hash=base32.b2a(p.digest()),
                          level=log.NOISY)
 
             offset += this_segment
@@ -547,7 +547,7 @@ class EncryptAnUploadable:
                      level=log.NOISY)
             self.log(format="plaintext leaf hash [%(segnum)d] is %(hash)s",
                      segnum=len(self._plaintext_segment_hashes)-1,
-                     hash=idlib.b2a(p.digest()),
+                     hash=base32.b2a(p.digest()),
                      level=log.NOISY)
         assert len(self._plaintext_segment_hashes) == num_segments
         return defer.succeed(tuple(self._plaintext_segment_hashes[first:last]))