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 20, 2024
1 parent 424300a commit d412303
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 = 0x21
CRC32 = 0x22


class PKIPubKeyUsage(IntEnum):
Expand Down Expand Up @@ -438,6 +440,7 @@ def _prepare_network_info(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'))
return payload

def provide_network_information(self,
Expand Down

0 comments on commit d412303

Please sign in to comment.