Convert hex string to bytes.
(hex_str: str)
| 27 | |
| 28 | |
| 29 | def hex_to_bytes(hex_str: str) -> bytes: |
| 30 | """Convert hex string to bytes.""" |
| 31 | if hex_str.startswith("0x"): |
| 32 | hex_str = hex_str[2:] |
| 33 | return bytes.fromhex(hex_str) |
| 34 | |
| 35 | |
| 36 | def bytes_to_hex(data: bytes) -> str: |
no outgoing calls
no test coverage detected