Replace the g_random_int() with the getrandom()