|
|
|
you use one that you make up. maybe like this:
$salt = substr(0, 2, md5(Date());
$encrypted = crypt($string, $salt);
The salt merely ensures that if 2 people have the same password, their
"crypted" representations are not the same (unless they use the same
salt). When you want to compare a password, you first find the already
encrypted one, grab the salt (the first 2 chars), and then encrypt the
password and compare it. |
|
| PHP Function to Encrypt/Decrypt a string without a known key. The string itself has his own different key for every character. Categories : PHP, Algorithms, Security, Authentication, Encryption | | | Using $PHP_AUTH_USER and $PHP_AUTH_PW to authenticate. Categories : Authentication, PHP | | | Basic Authentication with sessions Categories : PHP, Beginner Guides, Authentication, Form Processing, Sessions | | | A very simple and efficient split bar the B-Z bar , for mysql and php ...
Tired of obfuscated code try this one ...
Categories : PHP, Databases, MySQL, Algorithms | | | Password Creator: This PHP code exmaple shows how to use bitwise operations on a single variable and using it as a flagged variable. The class generates passwords of a given length using specified characters and the flags. Categories : PHP, PHP Classes, Algorithms, Security | | | Simple Password example Categories : PHP, Authentication, Security, HTTP | | | IPhider Obscure Any URL Anonymity connection lores obfuscation corporate survival. Categories : PHP, Algorithms, Security, URLs | | | Complete, simple working example of login screen and check on a unique page using php functions, cookies and mysql database. Categories : PHP, Cookies, MySQL, HTML and PHP, Authentication | | | Library of math functions to expand the functionality of PHP3. Version 1.2.1 fixes a major problem with the gcd function.
Categories : Algorithms, PHP, Math. | | | Credit Card Identification and Validation Class - The credit_card class provides methods for cleaning, validating and identifying the type of credit card numbers. Categories : PHP, PHP Classes, Credit Cards, Ecommerce, Algorithms | | | Function to remember password Categories : PHP, Authentication, Personalization and Membership | | | PHP4 MYSQL Authentication Script with cookie. Short & Sweet
Categories : Authentication, Apache, Cookies, PHP, MySQL | | | Is there some possibility to link a database to an htaccess file, so that instead of having a passwd file you would have a database with DES-crypted password and username fields? Categories : Authentication, PHP, General SQL, Databases | | | Check parameters validity. Paranoia was designed to check the validity of the parameters that a php page will receive after a form submission. It can be used to check the variables sent by POST or GET Categories : Algorithms, HTML and PHP, PHP, Variables | | | Authorize Me! An authentication script. Categories : MySQL, Databases, Authentication, PHP | |
| | | | Teeranai Thamshutiporn wrote : 199
I try to use your salt but It said :
Warning: Wrong parameter count for date()
in /home/internet/public_html/admin/passwd.php3
What`s wrong ?
I wanna To Check and Change Password on Linux vai PHP3
code [My Server use MD5]. Do you have same code ?
Regards,
Teeranai Thamshutiporn
| | | | Matt Szubrycht wrote :392
Hi,
You need to provide the format of the date ...
I would use the number of seconds since the epoch,
therefore, it should looks somewhat like this:
$salt = substr(0, 2, md5(Date("U")));
$encrypted = crypt($string, $salt);
That should do the trick, at least it works on my Cobalt
RAQ3 running Linux.
Regards,
Matt
| |
|
|
|