Generate a random string in hex of the specified size

    DO NOT use python provided random class its a Pseudo Random Number Generator
    and not secure enough for our needs

    :param size: size of the random string to generate
    :return: the hexadecimal random string

def randomString(size: int = 20) -> str:
    """
    Generate a random string in hex of the specified size

    DO NOT use python provided random class its a Pseudo Random Number Generator
    and not secure enough for our needs

    :param size: size of the random string to generate
    :return: the hexadecimal random string
    """

    def randomStr(size):
        if not isinstance(size, int):
            raise PlenumTypeError('size', size, int)
        if not size > 0:
            raise PlenumValueError('size', size, '> 0')
        # Approach 1
        rv = randombytes(size // 2).hex()

        return rv if size % 2 == 0 else rv + hex(randombytes_uniform(15))[-1]

        # Approach 2 this is faster than Approach 1, but lovesh had a doubt
        # that part of a random may not be truly random, so until
        # we have definite proof going to retain it commented
        # rstr = randombytes(size).hex()
        # return rstr[:size]

    return randomStr(size)