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:
parent
5bf5d477b9
commit
8880d218b3
@ -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)
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user