Is this the best idiom for using randomBytes to generate an N digit decimal number with 0 padding?

i couldn't find any good examples.