Skip to content

Commit

Permalink
Add CRC32 support to python client
Browse files Browse the repository at this point in the history
  • Loading branch information
cedelavergne-ledger committed Sep 19, 2024
1 parent f043d72 commit f4dbc45
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/src/ledger_app_clients/ethereum/client.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# from binascii import crc32
import rlp
from enum import IntEnum
from ragger.backend import BackendInterface
Expand Down Expand Up @@ -46,6 +47,7 @@ class NetworkInfoTag(IntEnum):
NETWORK_TICKER = 0x13
NETWORK_ICON = 0x14
SIGNATURE = 0x20
CRC32 = 0x21


class PKIPubKeyUsage(IntEnum):
Expand Down Expand Up @@ -454,6 +456,7 @@ def provide_network_information(self,
payload += icon
payload += format_tlv(NetworkInfoTag.SIGNATURE,
sign_data(Key.DOMAIN_NAME, payload))
# payload += format_tlv(NetworkInfoTag.CRC32, crc32(payload).to_bytes(4, 'big'))

chunks = self._cmd_builder.provide_network_information(payload)
for chunk in chunks[:-1]:
Expand Down

0 comments on commit f4dbc45

Please sign in to comment.