-
Salting the right way.
Hi.
For my first step I set up
this simple way
for every user at registration
[PHP]$secret= md5('rob'.'yoursalt');[/PHP]
I put $secret into Db
an than
[PHP]
$authAdapter = new Zend_Auth_Adapter_DbTable(
$db,
'usersmy',
'username',
'password',
"MD5(CONCAT(?,'yoursalt'))"
);
[/PHP]
and it works.
In the reference
Zend Framework: Documentation
there is an other way like
[PHP]
$adapter = new Zend_Auth_Adapter_DbTable(
$db,
'users',
'username',
'password',
"MD5(CONCAT('"
. Zend_Registry::get('staticSalt')
. "', ?, password_salt))"
);
[/PHP]
Can you give me a working example, please ?
Imho is better put the
md5 hash (password + salt)
in only one field (password)
Why the reference create an other
field password_salt ?
What do you think about ?
Bye.
Last edited by whisher; 05-27-2009 at 11:28 AM.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules