![]() | |||||||
Adding a SALT to your passwords Well, adding SALT's to your passwords are basically an added security type of thing. Usually people just add them to the back or front of the string or something of the sort. I broke up the password and salt and put them "side" of each other basically. This script breaks up the md5 32-bit md5 password, adds a random SALT to it if you dont already have a SALT, then combines them and returns a 64-bit virtually unbreakable password (ofc anything can be broken, thats why I said "virtually" :P) PHP Code: When using this with a DB, just add a field in the users table named SALT and insert the SALT when it is created. You will need to add some kind of user identifier with that also |
very nice post! thanks for sharing |
Hmmm, this code script can be useful, thanks! |
Before anyone goes and tries this, the function str_split() requires php5. http://us2.php.net/str_split PHP Code: (first post on php.net documentation for str_split) Just add that to your file before you go and use this on versions of php below 5. Nice post :) Cody |
So why not just do PHP Code: |
cool, thanks for mentioning that! |
Nice work, ill check it out, maybe use it soon for some things i will be working on :p |
very nice.. thank you :) |
PHP Code: SALT is random characters. You can do that if you want. iNod. |
a salt does not make a password more unbreakable, it reduces the damage when one is broken as you can't reuse the same attack vectors on multi passwords at the same time. Also, md5 should no longer be used. |
that's very useful. thank you |
thanks, i might try that. Now i jsut need to work out all about functions. |
Agreed. md5 can be cracked. Yep. It can be. I suggest you all start using sha1 or sha2 http://php.net/sha1 |
| All times are GMT -7. The time now is 09:53 PM. |
Powered by: vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0