Mark Scherer 2 年之前
父节点
当前提交
ed75342c43
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      docs/Behavior/Encryption.md

+ 3 - 3
docs/Behavior/Encryption.md

@@ -16,7 +16,7 @@ $this->addBehavior('Tools.Encryption', [
 ]);
 ```
 
-After attaching the behavior a call like
+After attaching the behavior, a call like
 
 ```php
 $user = $this->Users->newEmptyEntity();
@@ -25,7 +25,7 @@ $user = $this->Users->patchEntity($user, [
     'password' => 'a random generated string hopefully'
     'secret_field' => 'my super mysterious secret'
 ]);
-$this->Users->save($user);
+$this->Users->saveOrFail($user);
 ```
 
 will result in the `secret_field` to be automatically encrypted.
@@ -43,4 +43,4 @@ will automatically decrypt the binary data.
 ## Recommendations
 
 * Please do not use encryption if you don't need it! Password authentication for user login should always be implemented via hashing, not encryption.
-* It is recommended to use a separate encryption key compared to your `Secruity.salt` value.
+* It is recommended to use a separate encryption key compared to your `Security.salt` value.