mirror of
https://github.com/arnaucube/raspberryGPIOhtmlserver.git
synced 2026-02-08 12:16:42 +01:00
servidor funciona, gpio desabilitat
This commit is contained in:
14
node_modules/shortid/lib/random/random-byte-browser.js
generated
vendored
Executable file
14
node_modules/shortid/lib/random/random-byte-browser.js
generated
vendored
Executable file
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
|
||||
var crypto = window.crypto || window.msCrypto; // IE 11 uses window.msCrypto
|
||||
|
||||
function randomByte() {
|
||||
if (!crypto || !crypto.getRandomValues) {
|
||||
return Math.floor(Math.random() * 256) & 0x30;
|
||||
}
|
||||
var dest = new Uint8Array(1);
|
||||
crypto.getRandomValues(dest);
|
||||
return dest[0] & 0x30;
|
||||
}
|
||||
|
||||
module.exports = randomByte;
|
||||
Reference in New Issue
Block a user