@@ -6,7 +6,7 @@ |
||
6 | 6 | const VERSION = '1.0.0'; |
7 | 7 | |
8 | 8 | /** |
9 | - * @return integer The encrypt text |
|
9 | + * @return string The encrypt text |
|
10 | 10 | */ |
11 | 11 | public static function encrypt($plaintext, $bcrypt_version = '2y', $cost = 10) |
12 | 12 | { |
@@ -15,14 +15,14 @@ |
||
15 | 15 | |
16 | 16 | $salt = self::generateSalt(); |
17 | 17 | |
18 | - /* Create a string that will be passed to crypt, containing all |
|
18 | + /* Create a string that will be passed to crypt, containing all |
|
19 | 19 | * of the settings, separated by dollar signs |
20 | 20 | */ |
21 | - $salt = '$'.implode('$', [$bcrypt_version, $cost, $salt]); |
|
21 | + $salt = '$'.implode('$', [$bcrypt_version, $cost, $salt]); |
|
22 | 22 | |
23 | - $ciphertext = crypt($plaintext, $salt); |
|
23 | + $ciphertext = crypt($plaintext, $salt); |
|
24 | 24 | |
25 | - return $ciphertext; |
|
25 | + return $ciphertext; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | public static function verify($plaintext, $ciphertext) |
@@ -53,7 +53,7 @@ |
||
53 | 53 | * anything about the '=', as this only occurs when the b64 string is |
54 | 54 | * padded, which is always after the first 22 characters. |
55 | 55 | */ |
56 | - $salt=str_replace('+', '.', $salt); |
|
56 | + $salt = str_replace('+', '.', $salt); |
|
57 | 57 | return $salt; |
58 | 58 | } |
59 | 59 | } |