PHP如何实现一个高效的随机密码生成器?
- 内容介绍
- 文章标签
- 相关推荐
本文共计90个文字,预计阅读时间需要1分钟。
pythondef auth_pwgen(): pw='' c='bcdfghjklmnprstvwz' v='aeiou' a=c + v for i in range(0, 2): pw +=c[ord('a') + i] pw +=v[ord('a') + i]
function auth_pwgen(){ $pw = ''; $c = 'bcdfghjklmnprstvwz'; //consonants except hard to speak ones $v = 'aeiou'; //vowels $a = $c.$v; //both //use two syllables... for($i=0;$i < 2; $i++){ $pw .= $c[rand(0, strlen($c)-1)]; $pw .= $v[rand(0, strlen($v)-1)]; $pw .= $a[rand(0, strlen($a)-1)]; } //... and add a nice number $pw .= rand(10,99); return $pw; }
本文共计90个文字,预计阅读时间需要1分钟。
pythondef auth_pwgen(): pw='' c='bcdfghjklmnprstvwz' v='aeiou' a=c + v for i in range(0, 2): pw +=c[ord('a') + i] pw +=v[ord('a') + i]
function auth_pwgen(){ $pw = ''; $c = 'bcdfghjklmnprstvwz'; //consonants except hard to speak ones $v = 'aeiou'; //vowels $a = $c.$v; //both //use two syllables... for($i=0;$i < 2; $i++){ $pw .= $c[rand(0, strlen($c)-1)]; $pw .= $v[rand(0, strlen($v)-1)]; $pw .= $a[rand(0, strlen($a)-1)]; } //... and add a nice number $pw .= rand(10,99); return $pw; }

