@@ 385-395 (lines=11) @@ | ||
382 | * |
|
383 | * @return string 生成的字符串 |
|
384 | */ |
|
385 | public function getRandomStr() |
|
386 | { |
|
387 | $str = ""; |
|
388 | $str_pol = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz"; |
|
389 | $max = strlen($str_pol) - 1; |
|
390 | for ($i = 0; $i < 16; $i++) { |
|
391 | $str .= $str_pol[mt_rand(0, $max)]; |
|
392 | } |
|
393 | ||
394 | return $str; |
|
395 | } |
|
396 | } |
@@ 109-119 (lines=11) @@ | ||
106 | * |
|
107 | * @return string 生成的字符串 |
|
108 | */ |
|
109 | public function getRandomStr() |
|
110 | { |
|
111 | $str = ""; |
|
112 | $str_pol = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz"; |
|
113 | $max = strlen($str_pol) - 1; |
|
114 | for ($i = 0; $i < 16; $i++) { |
|
115 | $str .= $str_pol[mt_rand(0, $max)]; |
|
116 | } |
|
117 | ||
118 | return $str; |
|
119 | } |
|
120 | ||
121 | /** |
|
122 | * Return AESKey. |