Yii2 Username and Password Encryption

I looked at the yii2 application a few days ago and noted that the username and passwords from the login form are published without encryption. How can I make my username and password more secure? I know that it \yii\helpers\Security::encrypt($data, $secretKey)will encrypt data and simulate, we can decrypt it. But how to use it as a login form?

This is my login form.

    <?php $form = ActiveForm::begin(['id' => 'login-form']); ?>
    <?= $form->field($model, 'username') ?>
    <?= $form->field($model, 'password')->passwordInput() ?>
    <div class="form-group">
    <?= Html::submitButton('Login', ['class' => 'btn btn-info']) ?>
    </div>
    <?php ActiveForm::end(); ?>

How to handle encryption of user input here?

+4
source share
1 answer

Sisko78 , , ( - Javascript , , , ).

. :

, MD5 (...)

MD5, . , MD5 . () , , . HTTPS. .

+2

Source: https://habr.com/ru/post/1537877/


All Articles