import secrets


def randomHex(len: int):
    """Returns a random hex string at the given length."""
    byteArray = []
    for foo in range(len):
        byteArray.append(secrets.randbelow(255).to_bytes(1, "little"))
    return b"".join(byteArray).hex()