Arquivo da tag: Password

Gerar senha aleatória complexa (PHP e Javascript)

<?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 )
: $password;
}
?>

Continue lendo Gerar senha aleatória complexa (PHP e Javascript)