Answer the question
In order to leave comments, you need to log in
How to encrypt login in Yii framework?
In the Yii framework, I encrypt the user login:
Yii::app()->securityManager->encrypt('[email protected]')
and get the password hash:
CPasswordHelper::hashPassword('123456');
Then I save it in the database.
The question is:
How to find the login in the database during authorization if the cipher from '[email protected]' always turns out to be different, is it that I have to get all the records from the database and decrypt everything? What should I do if I do not want to store e-mail addresses in the database in clear text?
Answer the question
In order to leave comments, you need to log in
> the cipher from '[email protected]' is always different
Do you specify the key even when encrypting?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question