Use crypto:rand_uniform and removed `-1`

Since crypto:rand_uniform returns N, with Lo <= N < Hi, we don't need -1 here.