A very simple package with a randomBytes function, used either from window.crypto or 'crypto' in NodeJS.
randomBytes