09-20-2007, 10:15 AM
|
#2 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,239
Thanks: 3
|
If you want to create the salt within the SQL query itself you could use something along the lines of: LEFT(MD5(RAND()), 5) or even better,
LEFT(MD5(UUID()), 5)
Note that there is no requirement to limit the salt string to only 5 characters. Why not make the salt a 32 character MD5 string (remove the LEFT() from the SQL above)?
__________________
salathe@php.net
|
|
|
|