@@ -293,14 +293,11 @@ class Piece:
@staticmethod
def create(data):
- hash = SHA256.new()
- hash.update(data)
-
parts = chunked(data, Piece.PART_SIZE)
return Piece(
time.time(),
- hash.digest(),
+ sha256(data),
[
Part(
part,