generate random password

علی ذوالفقار
1402/12/19 08:37:25 (155)
Random Password Generator

Password Lenght :


Generate Copy
  var generatePassword = (
    length = 20,
    characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz~!@-#$'
  ) =>
    Array.from(crypto.getRandomValues(new Uint32Array(length)))
      .map((x) => characters[x % characters.length])
      .join('')
  
  console.log(generatePassword())        
message
Back