File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,16 @@ From the sources tree
4242## password hashing and verifying
4343
4444 $ php -a
45+
46+ php > var_dump($hash = password_hash("secret", PASSWORD_SHA512));
47+ string(106) "$6$y2T3Ql8zEgzbpZeK$s42Q92ggqycC280QMx4.bid1gKI8ghM7ZQJF.F.fbY49Cqj/gnS9h3CiOXyYh0pvtisqiNavSPJP8ZR9Ty7RX1"
48+
4549 php > var_dump($hash = password_hash("secret", PASSWORD_YESCRYPT));
4650 string(73) "$y$j9T$X9Va6i3zHjyKGJAskYZPv.$i1m/WR1C6/tqhB7IdOsi9Ar1JF4Qr38vBx104ao1OS5"
51+
52+ php > var_dump($hash = password_hash("secret", PASSWORD_YESCRYPT, ['cost'=>7]));
53+ string(73) "$y$jBT$bo5CcI5fdsyad1Av.vgLQ.$FgOq74zufVvkOL/q4OBmcKDMMXJB9VzrJXEZrhoVjf6"
54+
4755 php > var_dump(password_verify("secret", $hash));
4856 bool(true)
4957
You can’t perform that action at this time.
0 commit comments