I want to generate random numbers using randomBytes in NodeJS. After looking around I found a method that converts buffers to integers;
const integer = parseInt(buffer.toString("hex"), 16)
Is there something wrong with using this method. I've seen other solutions that use buffer.readUIntBE and other similar methods. I'm wondering what advantage they have over the solution above