Sensible Doctrine Expression and Zend_Auth setCredentialTreatment()

Posted by takeshin on Stack Overflow See other posts from Stack Overflow or by takeshin
Published on 2010-03-21T21:14:29Z Indexed on 2010/03/21 21:21 UTC
Read the original article Hit count: 441

Filed under:
|
|
|

How to create reasonable expression to store password in database using Doctrine and Zend_Auth::setCredentialTreatment()?

I don't want to use md5() and the code must be portable, and with salt.

I would call this not easy one to guess:

setCredentialTreatment("SHA1(CONCAT(username, SHA1(CONCAT(username, ?)))");

but it is not portable to all databases.

Seems that Doctrine_Expression has only md5 expression portability.

© Stack Overflow or respective owner

Related posts about php5

Related posts about doctrine