浏览代码

readme updated

euromark 11 年之前
父节点
当前提交
905e95de8d
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 4 3
      Controller/Component/Auth/ModernPasswordHasher.php
  2. 1 0
      README.md

+ 4 - 3
Controller/Component/Auth/ModernPasswordHasher.php

@@ -7,9 +7,10 @@ App::uses('AbstractPasswordHasher', 'Controller/Component/Auth');
  *
  *
  * This requires either PHP5.5+ or the password_hash() shim from
  * This requires either PHP5.5+ or the password_hash() shim from
  * https://github.com/ircmaxell/password_compat
  * https://github.com/ircmaxell/password_compat
- * If you don't use composer, you can also use the class in this repo:
+ * If you don't use composer, you can also directly use the class in this repo:
  *   require CakePlugin::path('Tools') . 'Lib/Bootstrap/Password.php';
  *   require CakePlugin::path('Tools') . 'Lib/Bootstrap/Password.php';
- * Ideally, in your bootstrap.php
+ * You would then require it in your bootstrap.php.
+ * But the preferred way would be a composer dependency.
  */
  */
 class ModernPasswordHasher extends AbstractPasswordHasher {
 class ModernPasswordHasher extends AbstractPasswordHasher {
 
 
@@ -54,7 +55,7 @@ class ModernPasswordHasher extends AbstractPasswordHasher {
 	 *
 	 *
 	 * @param string $password Plain text password to hash.
 	 * @param string $password Plain text password to hash.
 	 * @param string Existing hashed password.
 	 * @param string Existing hashed password.
-	 * @return boolean True if hashes match else false.
+	 * @return bool True if hashes match else false.
 	 */
 	 */
 	public function check($password, $hashedPassword) {
 	public function check($password, $hashedPassword) {
 		return password_verify($password, $hashedPassword);
 		return password_verify($password, $hashedPassword);

+ 1 - 0
README.md

@@ -131,6 +131,7 @@ A full list of fixes and useful migration tweaks towards the next major version
 * EmailLib as a wrapper for CakeEmail adding some more usefulness and making debugging/testing easier.
 * EmailLib as a wrapper for CakeEmail adding some more usefulness and making debugging/testing easier.
 * GoogleMapV3, Gravatar, Qrcode, Timeline, Typography, Ical, Hcard provide additional helper functionality.
 * GoogleMapV3, Gravatar, Qrcode, Timeline, Typography, Ical, Hcard provide additional helper functionality.
 * NEW: Backported StringTemplate class (from CakePHP3.0) can be used to use template based rendering of HTML tags.
 * NEW: Backported StringTemplate class (from CakePHP3.0) can be used to use template based rendering of HTML tags.
+* NEW: Backported password_hash() functionality via Tools.Modern PasswordHasher and Passwordable out of the box.
 
 
 and much more
 and much more