1
0
mirror of https://github.com/S2-/pwgen.git synced 2025-08-02 17:00:03 +02:00

add some more special chars

This commit is contained in:
s2
2017-11-20 11:27:36 +01:00
parent 2a0d1b0fe2
commit 48f8b8d5bc

View File

@@ -1,7 +1,7 @@
function randPassword(length, includeSpecial) {
let pwdChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
if (includeSpecial) {
pwdChars += '°^!"§$%&\/()=?`´\\}][{²³€|<>-.,;:*+_';
pwdChars += '°^!"§$%&/()=?`´\\}][{²³€|<>-.,;:*+_µ@~';
}
let randPassword = Array(length).fill(pwdChars).map(function(x) {
return x[Math.floor(Math.random() * x.length)]