Commented out special character generation in passwordGenerator.js
This commit is contained in:
parent
15b8d248a8
commit
800516c025
|
@ -5,7 +5,7 @@ export function passwordGenerator(length = 8) {
|
||||||
const lowerCaseLetters = 'abcdefghijklmnopqrstuvwxyz'
|
const lowerCaseLetters = 'abcdefghijklmnopqrstuvwxyz'
|
||||||
const upperCaseLetters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
const upperCaseLetters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
||||||
const numbers = '0123456789'
|
const numbers = '0123456789'
|
||||||
const specialCharacters = '!@#$%&*()[]{}/'
|
// const specialCharacters = '!@#$%&*()[]{}/'
|
||||||
|
|
||||||
// Initialize character set
|
// Initialize character set
|
||||||
let characterSet = ''
|
let characterSet = ''
|
||||||
|
@ -33,11 +33,11 @@ export function passwordGenerator(length = 8) {
|
||||||
password += numbers.charAt(Math.floor(Math.random() * numbers.length))
|
password += numbers.charAt(Math.floor(Math.random() * numbers.length))
|
||||||
|
|
||||||
// Add a special character to the character set
|
// Add a special character to the character set
|
||||||
characterSet += specialCharacters
|
// characterSet += specialCharacters
|
||||||
// Pick a random special character and add it to the password
|
// Pick a random special character and add it to the password
|
||||||
password += specialCharacters.charAt(
|
// password += specialCharacters.charAt(
|
||||||
Math.floor(Math.random() * specialCharacters.length)
|
// Math.floor(Math.random() * specialCharacters.length)
|
||||||
)
|
// )
|
||||||
|
|
||||||
// Add random characters to the password until it reaches the desired length
|
// Add random characters to the password until it reaches the desired length
|
||||||
for (let i = 4; i < length; i++) {
|
for (let i = 4; i < length; i++) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user