Re: passwords
| From: | Strider Centaur | Date: | Thu, 06 Jul 2000 16:56:46 +0000 |
| Subject: | Re: passwords | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5242@lists.php.net to get a copy of this message | ||
Look into crypt() should do the job well enough.
something like
function scramblePass($passwd){
return crypt( $passwd, "SA" );
}
Note that the salt value ( SA ) above should really be a 2 character string
randomly generated. But for what you looking for this will probably do fine.
To test to see if the password is correct on the other end you will need to
encrypt the plain text password with the same salt then compare the two
values. The salt is usually( I have not seen it otherwise except in the case
of MD5 ) the first 2 characters of the encrypted password.
Here's the URL at php.net: http://www.php.net/manual/function.crypt.php
Hope that helps
Abdul-Kareem Abo-Namous wrote:
> hi guys, thanks for the help last time. here's another one. how do i
> scramble a password before it is submitted (by a standard html form)? i dont
> like the look of a plain password in the url. it doesnt need to be
> 128-bit-encoded, i just want to implement my own scrambler/descrambler.
> ideas?
>
> Aan97
> Abdul-Kareem Abo-Namous
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Strider Centaur
HTTP://www.Scifi-Fantasy.com
" It is my observation that unless you really understand the issues, you are
hardly in a position to criticize. Nearly all Linux users have used Windows,
but very few Windows users have used Linux. " -- Me