From dd9251ad6bc1566528d5bfb10c7880649dfed5ed Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Mon, 27 Oct 2014 22:28:30 +0300 Subject: [PATCH] Fixed #5769: fixed method names in Security guide --- docs/guide/security-passwords.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/security-passwords.md b/docs/guide/security-passwords.md index 5459912b61..3f769f3c34 100644 --- a/docs/guide/security-passwords.md +++ b/docs/guide/security-passwords.md @@ -56,7 +56,7 @@ For example, we need to store some information in our database but we need to ma ```php // $data and $secretKey are obtained from the form -$encryptedData = Yii::$app->getSecurity()->encrypt($data, $secretKey); +$encryptedData = Yii::$app->getSecurity()->encryptByPassword($data, $secretKey); // store $encryptedData to database ``` @@ -64,7 +64,7 @@ Subsequently when user wants to read the data: ```php // $secretKey is obtained from user input, $encryptedData is from the database -$data = Yii::$app->getSecurity()->decrypt($encryptedData, $secretKey); +$data = Yii::$app->getSecurity()->decryptByPassword($encryptedData, $secretKey); ``` Confirming data integrity