We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c7eb26 commit 0fa4104Copy full SHA for 0fa4104
README.md
@@ -67,6 +67,25 @@ From the sources tree
67
68
* `cost` controls the CPU time cost of the hash. If `cost` is 0, a reasonable default cost will be selected.
69
70
+## crypt helpers
71
+
72
+ $ php -a
73
74
+ php > var_dump(crypt_preferred_method());
75
+ string(3) "$y$"
76
77
+ php > var_dump($salt = crypt_gensalt());
78
+ string(29) "$y$j9T$EitfN8MxRjFzV5tNe97D70"
79
80
+ php > var_dump(crypt_checksalt($salt) == CRYPT_SALT_OK);
81
+ bool(true)
82
83
+ php > var_dump($hash = crypt("secret", $salt));
84
+ string(73) "$y$j9T$EitfN8MxRjFzV5tNe97D70$vGtxczdGMTLh0LfpwxAmyzgba7EODsmazEh03kpvbh3"
85
86
+ php > var_dump($hash === crypt("secret", $hash));
87
88
89
# LICENSE
90
91
Author: Remi Collet
0 commit comments