\f
;; Password generation
-(defconst *lowercase*
+(defconst *alphanumerics*
'("a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m"
- "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z")
- "List of strings containing the lowercase English alphabet.")
-
-(defconst *uppercase*
- '("A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M"
- "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z")
- "List of strings containing the uppercase English alphabet.")
-
-(defconst *numbers*
- '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9")
- "List of strings containing the single-digit numbers.")
-
-(defconst *special-characters* '("!" "?" "$" "%" "&" "'" "(" ")" "*"
- "+" "," "-" "." "/" ":" ";" "<" "=" ">"
- "?" "@" "[" "]" "^" "_" "{" "|" "}" "~")
+ "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z"
+ "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M"
+ "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z"
+ "0" "1" "2" "3" "4" "5" "6" "7" "8" "9")
+ "List of strings of the upper/lower-case English alphabet, and the single-digit numbers.")
+
+(defconst *special-characters*
+ '("!" "?" "$" "%" "&" "'" "(" ")" "*" "+" "," "-" "."
+ "/" ":" ";" "<" "=" ">" "?" "@" "[" "]" "^" "_" "{"
+ "|" "}" "~")
"List of strings containing the special visible characters excluding \\ and \" .")
(defun pw-get-char (&optional no-special-chars)
"Select a single character at random to be used in a password.
If `no-special-chars' is t, use only alpha-numeric characters."
- (let ((selected-charset (append *lowercase*
- *uppercase*
- *numbers*
+ (let ((selected-charset (append *alphanumerics*
(when (null no-special-chars)
*special-characters*))))
(elt selected-charset (random (length selected-charset)))))