Jump to content
xisto Community
Sign in to follow this  
iGuest

creat password with php?

Recommended Posts

If you mean how to get a random password, this is one way to do it:

function RandomPass( $passLength ) [br]{ [/br]  $PassChars = 'ABVDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; [br]  $Vouel = 'aeiou'; [/br]  $Pass = ""; [br] [/br]  for ($index = 1; $index <= $passLength; $index++) [br]  {        [/br]     if ($index % 3 == 0) [br]     { [/br]       $randomNumber = rand(1,strlen($Vouel)); [br]       $Pass .= substr($Vouel,$randomNumber-1,1);    [/br]     }else [br]       { [/br]         $randomNumber = rand(1,strlen($PassChars)); [br]         $Pass .= substr($PassChars,$randomNumber-1,1); [/br]       } [br]  } [/br]  return $Pass; } [br] [/br]$regpass = RandomPass(6);

Share this post


Link to post
Share on other sites

Right off, how I'd probably do it is I'd encode the password.Php Base64_encoding is widely used. You could just tryencoding the value several times once it's been posted.Just keep track of that in your script of course.There has to be more obscure encodings than base_64 though.You could try making up your own if anything.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.