Please see this
or this
// Kick start this browsers random number generator
let loop_da_loop = Math.floor(Math.random() * 100) + 25;
for (let c = 0; c < loop_da_loop; c++) {
let r = Math.random();
}
function createEUI() {
var EUI = [
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256)
];
EUI[0] = (EUI[0] & ~1) | 2;
document.getElementById("type").innerHTML = "EUI";
document.getElementById("justDigits").innerHTML = justDigits(EUI);
document.getElementById("justDigitsUpper").innerHTML = justDigits(EUI).toUpperCase();
document.getElementById("hexyDigitsUpper").innerHTML = hexyDigits(EUI);
}
function createKey() {
var Key = [
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256),
Math.floor(Math.random() * 256)
];
document.getElementById("type").innerHTML = "Key";
document.getElementById("justDigits").innerHTML = justDigits(Key);
document.getElementById("justDigitsUpper").innerHTML = justDigits(Key).toUpperCase();
document.getElementById("hexyDigitsUpper").innerHTML = hexyDigits(Key);
}