I need to generate some passwords (password generator), but I want to avoid characters that can be confused with each other (for example: Chair2bok). How can I do that?
Asked
Active
Viewed 732 times
3 Answers
2
Why don't you just use a character set that you DO want to use rather than those to avoid?
A standard set of 64 characters
!#%+23456789:=?@ABCDEFGHJKLMNPRS
TUVWXYZabcdefghijkmnopqrstuvwxyz
A larger set of 88 characters
!"#$%&'()*+,-./23456789:;<=>?@ABCDEFGHJKLMNO
PRSTUVWXYZ[\]^_abcdefghijkmnopqrstuvwxyz{|}~
Source: Characters to avoid in automatically generated passwords
0
I blogged about how to generate a strong password for SQL Server HERE. It uses strings that you can remove the characters you don't want. I've already removed some like 1, I, 0, and O.
private static string CHARS_LCASE = "abcdefgijkmnopqrstwxyz";
private static string CHARS_UCASE = "ABCDEFGHJKLMNPQRSTWXYZ";
private static string CHARS_NUMERIC = "23456789";
private static string CHARS_SPECIAL = "*-+_%/";
private static string CHARS_ALL = CHARS_LCASE + CHARS_UCASE
+ CHARS_NUMERIC + CHARS_SPECIAL;

John Saunders
- 160,644
- 26
- 247
- 397

JBrooks
- 9,901
- 2
- 28
- 32