File size: 272 Bytes
60e3a80
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
def int_to_bytes(int: int) -> bytes:
    """Convert int to a 24 byte big endian byte string"""
    return int.to_bytes(24, "big")


def bytes_to_int(bytes: bytes) -> int:
    """Convert a 24 byte big endian byte string to an int"""
    return int.from_bytes(bytes, "big")