Skip to content

Commit

Permalink
Update pycryptodome and remove bytes conversion (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
palango authored and pipermerriam committed Mar 15, 2018
1 parent 8eff70e commit 82cf372
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions eth_hash/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def __call__(self, preimage):
"Can only compute the hash of `bytes` or `bytearray` values, not %r" % preimage
)

return self.hasher(bytes(preimage))
return self.hasher(preimage)

def new(self, part):
if not isinstance(part, (bytes, bytearray)):
Expand All @@ -30,7 +30,7 @@ def update(self, part):
raise TypeError(
"Can only compute the hash of `bytes` or `bytearray` values, not %r" % part
)
self.preimage_parts.append(bytes(part))
self.preimage_parts.append(part)

def digest(self):
return self.keccak_fn(b''.join(self.preimage_parts))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
],
# optional backends:
'pycryptodome': [
"pycryptodome>=3.4.6,<4",
"pycryptodome>=3.5.1,<4",
],
'pysha3': [
"pysha3>=1.0.0,<2.0.0",
Expand Down

0 comments on commit 82cf372

Please sign in to comment.