@staticmethod
def to_byte_array(num: int) -> bytearray:
    return bytearray(num.to_bytes(int(math.ceil((num.bit_length() / 8))), 'big'))
@staticmethod
def to_byte_array(num: int) -> bytearray:
    return bytearray(num.to_bytes(int(math.ceil((num.bit_length() / 8))), 'big'))