Update password generator with non-ambigious char improvement (#1398)

This commit is contained in:
Leendert de Borst
2025-11-27 10:10:24 +01:00
parent 62cc0e7c2b
commit 4e0db87bc3
9 changed files with 132 additions and 6 deletions

View File

@@ -36,6 +36,20 @@ declare class PasswordGenerator {
private readonly uppercaseChars;
private readonly numberChars;
private readonly specialChars;
/**
* Ambiguous characters that look similar and are easy to confuse when typing:
* - I, l, 1, | (pipe) - all look like vertical lines
* - O, 0, o - all look like circles
* - Z, 2 - similar appearance
* - S, 5 - similar appearance
* - B, 8 - similar appearance
* - G, 6 - similar appearance
* - Brackets, braces, parentheses: [], {}, ()
* - Quotes: ', ", `
* - Punctuation pairs: ;:, .,
* - Dashes: -, _
* - Angle brackets: <>
*/
private readonly ambiguousChars;
private length;
private useLowercase;

View File

@@ -39,7 +39,21 @@ var PasswordGenerator = class {
this.uppercaseChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
this.numberChars = "0123456789";
this.specialChars = "!@#$%^&*()_+-=[]{}|;:,.<>?";
this.ambiguousChars = "Il1O0o";
/**
* Ambiguous characters that look similar and are easy to confuse when typing:
* - I, l, 1, | (pipe) - all look like vertical lines
* - O, 0, o - all look like circles
* - Z, 2 - similar appearance
* - S, 5 - similar appearance
* - B, 8 - similar appearance
* - G, 6 - similar appearance
* - Brackets, braces, parentheses: [], {}, ()
* - Quotes: ', ", `
* - Punctuation pairs: ;:, .,
* - Dashes: -, _
* - Angle brackets: <>
*/
this.ambiguousChars = "Il1O0oZzSsBbGg2568|[]{}()<>;:,.`'\"_-";
this.length = 18;
this.useLowercase = true;
this.useUppercase = true;

View File

@@ -13,7 +13,21 @@ var PasswordGenerator = class {
this.uppercaseChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
this.numberChars = "0123456789";
this.specialChars = "!@#$%^&*()_+-=[]{}|;:,.<>?";
this.ambiguousChars = "Il1O0o";
/**
* Ambiguous characters that look similar and are easy to confuse when typing:
* - I, l, 1, | (pipe) - all look like vertical lines
* - O, 0, o - all look like circles
* - Z, 2 - similar appearance
* - S, 5 - similar appearance
* - B, 8 - similar appearance
* - G, 6 - similar appearance
* - Brackets, braces, parentheses: [], {}, ()
* - Quotes: ', ", `
* - Punctuation pairs: ;:, .,
* - Dashes: -, _
* - Angle brackets: <>
*/
this.ambiguousChars = "Il1O0oZzSsBbGg2568|[]{}()<>;:,.`'\"_-";
this.length = 18;
this.useLowercase = true;
this.useUppercase = true;

View File

@@ -36,6 +36,20 @@ declare class PasswordGenerator {
private readonly uppercaseChars;
private readonly numberChars;
private readonly specialChars;
/**
* Ambiguous characters that look similar and are easy to confuse when typing:
* - I, l, 1, | (pipe) - all look like vertical lines
* - O, 0, o - all look like circles
* - Z, 2 - similar appearance
* - S, 5 - similar appearance
* - B, 8 - similar appearance
* - G, 6 - similar appearance
* - Brackets, braces, parentheses: [], {}, ()
* - Quotes: ', ", `
* - Punctuation pairs: ;:, .,
* - Dashes: -, _
* - Angle brackets: <>
*/
private readonly ambiguousChars;
private length;
private useLowercase;

View File

@@ -39,7 +39,21 @@ var PasswordGenerator = class {
this.uppercaseChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
this.numberChars = "0123456789";
this.specialChars = "!@#$%^&*()_+-=[]{}|;:,.<>?";
this.ambiguousChars = "Il1O0o";
/**
* Ambiguous characters that look similar and are easy to confuse when typing:
* - I, l, 1, | (pipe) - all look like vertical lines
* - O, 0, o - all look like circles
* - Z, 2 - similar appearance
* - S, 5 - similar appearance
* - B, 8 - similar appearance
* - G, 6 - similar appearance
* - Brackets, braces, parentheses: [], {}, ()
* - Quotes: ', ", `
* - Punctuation pairs: ;:, .,
* - Dashes: -, _
* - Angle brackets: <>
*/
this.ambiguousChars = "Il1O0oZzSsBbGg2568|[]{}()<>;:,.`'\"_-";
this.length = 18;
this.useLowercase = true;
this.useUppercase = true;

View File

@@ -13,7 +13,21 @@ var PasswordGenerator = class {
this.uppercaseChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
this.numberChars = "0123456789";
this.specialChars = "!@#$%^&*()_+-=[]{}|;:,.<>?";
this.ambiguousChars = "Il1O0o";
/**
* Ambiguous characters that look similar and are easy to confuse when typing:
* - I, l, 1, | (pipe) - all look like vertical lines
* - O, 0, o - all look like circles
* - Z, 2 - similar appearance
* - S, 5 - similar appearance
* - B, 8 - similar appearance
* - G, 6 - similar appearance
* - Brackets, braces, parentheses: [], {}, ()
* - Quotes: ', ", `
* - Punctuation pairs: ;:, .,
* - Dashes: -, _
* - Angle brackets: <>
*/
this.ambiguousChars = "Il1O0oZzSsBbGg2568|[]{}()<>;:,.`'\"_-";
this.length = 18;
this.useLowercase = true;
this.useUppercase = true;

View File

@@ -36,6 +36,20 @@ declare class PasswordGenerator {
private readonly uppercaseChars;
private readonly numberChars;
private readonly specialChars;
/**
* Ambiguous characters that look similar and are easy to confuse when typing:
* - I, l, 1, | (pipe) - all look like vertical lines
* - O, 0, o - all look like circles
* - Z, 2 - similar appearance
* - S, 5 - similar appearance
* - B, 8 - similar appearance
* - G, 6 - similar appearance
* - Brackets, braces, parentheses: [], {}, ()
* - Quotes: ', ", `
* - Punctuation pairs: ;:, .,
* - Dashes: -, _
* - Angle brackets: <>
*/
private readonly ambiguousChars;
private length;
private useLowercase;

View File

@@ -39,7 +39,21 @@ var PasswordGenerator = class {
this.uppercaseChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
this.numberChars = "0123456789";
this.specialChars = "!@#$%^&*()_+-=[]{}|;:,.<>?";
this.ambiguousChars = "Il1O0o";
/**
* Ambiguous characters that look similar and are easy to confuse when typing:
* - I, l, 1, | (pipe) - all look like vertical lines
* - O, 0, o - all look like circles
* - Z, 2 - similar appearance
* - S, 5 - similar appearance
* - B, 8 - similar appearance
* - G, 6 - similar appearance
* - Brackets, braces, parentheses: [], {}, ()
* - Quotes: ', ", `
* - Punctuation pairs: ;:, .,
* - Dashes: -, _
* - Angle brackets: <>
*/
this.ambiguousChars = "Il1O0oZzSsBbGg2568|[]{}()<>;:,.`'\"_-";
this.length = 18;
this.useLowercase = true;
this.useUppercase = true;

View File

@@ -13,7 +13,21 @@ var PasswordGenerator = class {
this.uppercaseChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
this.numberChars = "0123456789";
this.specialChars = "!@#$%^&*()_+-=[]{}|;:,.<>?";
this.ambiguousChars = "Il1O0o";
/**
* Ambiguous characters that look similar and are easy to confuse when typing:
* - I, l, 1, | (pipe) - all look like vertical lines
* - O, 0, o - all look like circles
* - Z, 2 - similar appearance
* - S, 5 - similar appearance
* - B, 8 - similar appearance
* - G, 6 - similar appearance
* - Brackets, braces, parentheses: [], {}, ()
* - Quotes: ', ", `
* - Punctuation pairs: ;:, .,
* - Dashes: -, _
* - Angle brackets: <>
*/
this.ambiguousChars = "Il1O0oZzSsBbGg2568|[]{}()<>;:,.`'\"_-";
this.length = 18;
this.useLowercase = true;
this.useUppercase = true;