1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-18 20:38:10 +00:00

HashWriter: extra arguments are passed to the hash function

This commit is contained in:
Tomas Susanka 2017-12-22 16:42:49 +01:00
parent 5bf5d477b9
commit 8880d218b3
2 changed files with 3 additions and 3 deletions

View File

@ -12,5 +12,5 @@ class HashWriter:
self.buf[0] = b self.buf[0] = b
self.ctx.update(self.buf) self.ctx.update(self.buf)
def getvalue(self) -> bytes: def getvalue(self, *args) -> bytes:
return self.ctx.digest() return self.ctx.digest(*args)

View File

@ -70,7 +70,7 @@ async def ethereum_sign_tx(ctx, msg):
sha.extend(rlp.encode(0)) sha.extend(rlp.encode(0))
sha.extend(rlp.encode(0)) sha.extend(rlp.encode(0))
digest = sha.getvalue() digest = sha.getvalue(True)
return await send_signature(ctx, msg, digest) return await send_signature(ctx, msg, digest)