diff options
author | Remi Collet <remi@remirepo.net> | 2024-08-29 08:24:09 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-08-29 08:24:09 +0200 |
commit | a967935655c33b87c298a8b92ffdf4335cd7f5fd (patch) | |
tree | 2d0652a691f5460a14824499442d7a4bffd1cb21 | |
parent | a4dfd6a9d4a648075236ad76c5257ec32d74aefb (diff) |
more examples
-rw-r--r-- | README.md | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -42,8 +42,16 @@ From the sources tree ## password hashing and verifying $ php -a + + php > var_dump($hash = password_hash("secret", PASSWORD_SHA512)); + string(106) "$6$y2T3Ql8zEgzbpZeK$s42Q92ggqycC280QMx4.bid1gKI8ghM7ZQJF.F.fbY49Cqj/gnS9h3CiOXyYh0pvtisqiNavSPJP8ZR9Ty7RX1" + php > var_dump($hash = password_hash("secret", PASSWORD_YESCRYPT)); string(73) "$y$j9T$X9Va6i3zHjyKGJAskYZPv.$i1m/WR1C6/tqhB7IdOsi9Ar1JF4Qr38vBx104ao1OS5" + + php > var_dump($hash = password_hash("secret", PASSWORD_YESCRYPT, ['cost'=>7])); + string(73) "$y$jBT$bo5CcI5fdsyad1Av.vgLQ.$FgOq74zufVvkOL/q4OBmcKDMMXJB9VzrJXEZrhoVjf6" + php > var_dump(password_verify("secret", $hash)); bool(true) |