Correctly use randomBytes instead of getRandomBytes