Tag: Password
17 de outubro de 2011
/ Dicas, JavaScript, PHP
Gerar senha aleatória complexa (PHP e Javascript)
[sourcecode language=”php”] <?php function randomPassword( $length = 10, $chars = ’0123456789abcdefghijkLMNPRSTUWXY!@$&*()-+_={}[]:;<>?,.’ ) { $password = ”; for ( $i = 0; $i < $length; $i++ ) { $chars = str_shuffle( $chars ); $char = $chars[0]; $password .= $char; } return strlen( $password ) < $length ? randomPassword( $length, $chars )…