browserify / crypto-browserify

partial implementation of node's `crypto` for the browser
MIT License
653 stars 199 forks source link

feat: crypto.randomInt([min, ]max[, callback]) #224

Open SamuelScheit opened 11 months ago

SamuelScheit commented 11 months ago

nodejs crypto module provides a randomInt function, which is missing in the crypto-browserify package. The implementation can be made using the web crypto api and the getRandomValues() function and use Math.random as a fallback