crypto.js 245 B

1234567891011
  1. // mimic a subset of node's crypto API for the browser
  2. function randomBytes(width) {
  3. var out = new Uint8Array(width);
  4. (global.crypto || global.msCrypto).getRandomValues(out);
  5. return out;
  6. }
  7. module.exports = {
  8. randomBytes: randomBytes
  9. }