Browse Source

Realm key generator

pull/1/head
Tim Glasgow 2 years ago
parent
commit
c9e9898581
  1. 13
      squarenotsquare/libs/Random.js

13
squarenotsquare/libs/Random.js

@ -0,0 +1,13 @@
export function generateKey() {
let result = [];
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
let charactersLength = characters.length;
for (let i = 0; i < 64; i++) {
result.push(
characters.charAt(Math.floor(Math.random() * charactersLength)),
);
}
return result.join('');
}
Loading…
Cancel
Save