php-general | 2000071
Date: 07/06/00
- Next message: Roberto Cespa: "Re: [PHP] Session Management problems [LONG]"
- Previous message: Kenneth Bogucki: "Re: [PHP] Compile?"
- In reply to: Abdul-Kareem Abo-Namous: "[PHP] passwords"
- Next in thread: Chris Moyer: "Re: [PHP] passwords"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
-- 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
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Roberto Cespa: "Re: [PHP] Session Management problems [LONG]"
- Previous message: Kenneth Bogucki: "Re: [PHP] Compile?"
- In reply to: Abdul-Kareem Abo-Namous: "[PHP] passwords"
- Next in thread: Chris Moyer: "Re: [PHP] passwords"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

