def bytes(num_bytes):
    if not isinstance(num_bytes, _integer_types):
        raise TypeError("num_bytes must be an integer")

    if num_bytes < 0:
        raise ValueError("num_bytes must not be negative")

    result_buffer = _ffi.new("char[]", num_bytes)
    result_code = _lib.RAND_bytes(result_buffer, num_bytes)
    if result_code == -1:
        # TODO: No tests for this code path.  Triggering a RAND_bytes failure
        # might involve supplying a custom ENGINE?  That's hard.
        _raise_current_error()

    return _ffi.buffer(result_buffer)[:]
Given a config set the username attribute
dataset/ETHPy150Open pyca/pyopenssl/src/OpenSSL/rand.py/bytes--crossover with--dataset/ETHPy150Open myusuf3/octogit/octogit/config.py/set_username