# 如何生成超级强度的密码(退出人人与QQ)

cipher=
{88 -> 48, 49 -> 49, 55 -> 50, 89 -> 51, 116 -> 52, 79 -> 53, 73 -> 54, 99 -> 55, 74 -> 56, 86 -> 57, 52 -> 58,
97 -> 59, 53 -> 60, 114 -> 61, 61 -> 62, 91 -> 63, 113 -> 64, 106 -> 65, 103 -> 66, 101 -> 67, 69 -> 68,
84 -> 69, 60 -> 70, 93 -> 71, 70 -> 72, 82 -> 73, 102 -> 74, 77 -> 75, 57 -> 76, 85 -> 77, 67 -> 78, 117 -> 79,
50 -> 80, 65 -> 81, 76 -> 82, 81 -> 83, 110 -> 84, 121 -> 85, 51 -> 86, 83 -> 87, 58 -> 88, 54 -> 89, 108 -> 90,
107 -> 91, 115 -> 92, 78 -> 93, 104 -> 94, 80 -> 95, 92 -> 96, 109 -> 97, 64 -> 98, 48 -> 99, 87 -> 100,
75 -> 101, 111 -> 102, 95 -> 103, 68 -> 104, 119 -> 105, 62 -> 106, 96 -> 107, 112 -> 108, 122 -> 109,
72 -> 110, 120 -> 111, 100 -> 112, 90 -> 113, 71 -> 114, 94 -> 115, 105 -> 116, 59 -> 117, 63 -> 118,
118 -> 119, 98 -> 120, 66 -> 121, 56 -> 122}

• 假设我们的简单密码是:123456
• 经过第三步的随机扰乱后的密码是:D1cQhNVL:LyQ<LQyyD<YDc<2HPcHzzVD

### 附件

• ASCII码对照表
• Mathematica下的对应代码
1. 第一、二步中生成MD5并将其自动转为大写字母代码

IntegerString[Hash["123456", "MD5"], 16, 32]//ToUpperCase

2. 第三步中使用扰乱码加密的过程:

enc = FromCharacterCode[ToCharacterCode[InputString[]] /. cipher]

FromCharacterCode[ToCharacterCode[enc] /. Map[Reverse, cipher]]
{b, e} = Sort[ToCharacterCode["0z"]];
cipher = Thread[RandomSample[Range[b, e]] ->Range[b, e]]