import binascii


def int2bytes(i: int) -> bytes:
    """
    Converts integer numbers to bytes
    """

    hex_string = "%x" % i
    n = len(hex_string)

    return binascii.unhexlify(hex_string.zfill(n + (n & 1)))