]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
encode.py: fix generation of plaintext/crypttext merkle trees
authorBrian Warner <warner@lothar.com>
Thu, 7 Jun 2007 20:14:14 +0000 (13:14 -0700)
committerBrian Warner <warner@lothar.com>
Thu, 7 Jun 2007 20:14:14 +0000 (13:14 -0700)
src/allmydata/encode.py

index 444d1e45e220c99c32f0985dbaab35c0f1e1fa0d..61a0c5a0c6b9d5541e020059b96d979149246c93 100644 (file)
@@ -259,8 +259,9 @@ class Encoder(object):
             crypttext_hasher.update(encrypted_piece)
             chunks.append(encrypted_piece)
 
-        self._plaintext_hashes.append(plaintext_hash(input_piece))
-        self._crypttext_hashes.append(crypttext_hash(encrypted_piece))
+        self._plaintext_hashes.append(plaintext_hasher.digest())
+        self._crypttext_hashes.append(crypttext_hasher.digest())
+
         d = codec.encode(chunks)
         d.addCallback(self._encoded_segment, segnum)
         return d