mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
tools: small refactor in keyctl
This commit is contained in:
parent
754cf3672d
commit
03943c960b
@ -32,9 +32,8 @@ def header_to_sign(index, data):
|
||||
elif index == 1: # vendorheader
|
||||
return data[:-65] + z
|
||||
elif index == 2: # firmware
|
||||
vlen = struct.unpack('<I', data[4:8])
|
||||
vlen = vlen[0]
|
||||
return data[vlen:vlen + 0x03BF] + z
|
||||
vhdrlen = struct.unpack('<I', data[4:8])[0]
|
||||
return data[vhdrlen:vhdrlen + 0x03BF] + z
|
||||
|
||||
|
||||
@click.group()
|
||||
|
Loading…
Reference in New Issue
Block a user