Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
dd9251ad
Commit
dd9251ad
authored
Oct 27, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed #5769: fixed method names in Security guide
parent
040d1550
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
security-passwords.md
docs/guide/security-passwords.md
+2
-2
No files found.
docs/guide/security-passwords.md
View file @
dd9251ad
...
@@ -56,7 +56,7 @@ For example, we need to store some information in our database but we need to ma
...
@@ -56,7 +56,7 @@ For example, we need to store some information in our database but we need to ma
```php
```php
// $data and $secretKey are obtained from the form
// $data and $secretKey are obtained from the form
$encryptedData = Yii::$app->getSecurity()->encrypt($data, $secretKey);
$encryptedData = Yii::$app->getSecurity()->encrypt
ByPassword
($data, $secretKey);
// store $encryptedData to database
// store $encryptedData to database
```
```
...
@@ -64,7 +64,7 @@ Subsequently when user wants to read the data:
...
@@ -64,7 +64,7 @@ Subsequently when user wants to read the data:
```
php
```
php
// $secretKey is obtained from user input, $encryptedData is from the database
// $secretKey is obtained from user input, $encryptedData is from the database
$data
=
Yii
::
$app
->
getSecurity
()
->
decrypt
(
$encryptedData
,
$secretKey
);
$data
=
Yii
::
$app
->
getSecurity
()
->
decrypt
ByPassword
(
$encryptedData
,
$secretKey
);
```
```
Confirming data integrity
Confirming data integrity
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment