Skip to content

Commit 20dfaf4

Browse files
committed
improved PHP doc
1 parent 7cf7019 commit 20dfaf4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Security/Passwords.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ class Passwords
2727

2828

2929
/**
30-
* See https://php.net/manual/en/password.constants.php
30+
* Chooses which secure algorithm is used for hashing and how to configure it.
31+
* @see https://php.net/manual/en/password.constants.php
3132
*/
3233
public function __construct($algo = PASSWORD_DEFAULT, array $options = [])
3334
{
@@ -37,7 +38,7 @@ public function __construct($algo = PASSWORD_DEFAULT, array $options = [])
3738

3839

3940
/**
40-
* Computes salted password hash.
41+
* Computes password´s hash. The result contains the algorithm ID and its settings, cryptographical salt and the hash itself.
4142
*/
4243
public function hash(string $password): string
4344
{
@@ -57,7 +58,7 @@ public function hash(string $password): string
5758

5859

5960
/**
60-
* Verifies that a password matches a hash.
61+
* Finds out, whether the given password matches the given hash.
6162
*/
6263
public function verify(string $password, string $hash): bool
6364
{
@@ -66,7 +67,7 @@ public function verify(string $password, string $hash): bool
6667

6768

6869
/**
69-
* Checks if the given hash matches the options.
70+
* Finds out if the hash matches the options given in constructor.
7071
*/
7172
public function needsRehash(string $hash): bool
7273
{

0 commit comments

Comments
 (0)