const char lower[] = "abcdefghijkmnpqrstuvwxyz"; // 去除 l,o
const char upper[] = "ABCDEFGHJKLMNPQRSTUVWXYZ"; // 去除 I,O
const char number[] = "23456789"; // 去除 1,0
const char special[] = "!@#$%^&*()-=_+[]{};:'\"<>,.?/";
mkpasslen/4=4 位,剩餘 1 位補特殊字符。pass[0..16]。for(i=0;i<32;i++) swap(pass[i%17], pass[rand()%17])。pass[17]='\0'。srand(time(0));
for (int i=0; i<16; i++) { mkpass(buf); printf("%s\n", buf); }
生成 16 個強密碼,均含四類字符且順序隨機,避免視覺混淆字符(l/1, O/0)。