@@ -21,6 +21,11 @@ |
||
| 21 | 21 | return crypt($plaintext, $ciphertext) == $ciphertext; |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | + /** |
|
| 25 | + * @param integer $cost |
|
| 26 | + * @param integer $length |
|
| 27 | + * @param string $bcrypt_version |
|
| 28 | + */ |
|
| 24 | 29 | public static function generate_salt($cost, $length, $bcrypt_version){ |
| 25 | 30 | //make sure adding the cost in two digits |
| 26 | 31 | $cost = sprintf('%02d', $cost); |