1 changed files with 13 additions and 0 deletions
@ -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…
Reference in new issue