File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,14 @@ $passwd = 'password';
10
10
$ hash = sodium_crypto_pwhash_str
11
11
($ passwd , SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE ,
12
12
SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE );
13
- var_dump (substr ($ hash , 0 , 9 ) ===
13
+ var_dump (substr ($ hash , 0 , strlen ( SODIUM_CRYPTO_PWHASH_STRPREFIX ) ) ===
14
14
SODIUM_CRYPTO_PWHASH_STRPREFIX );
15
15
16
16
$ testHash = '$argon2i$v=19$m=4096,t=3,p=1$MzE4ODFiZWFlMjAzOWUAAA$FWUV6tsyJ32qThiLi1cCsLIbf3dIOG/RwXcTzt536KY ' ;
17
17
$ c = sodium_crypto_pwhash_str_verify ($ testHash , $ passwd );
18
18
var_dump ($ c );
19
19
20
- $ testHash = '$argon2i$v=19$m=4096,t=2 ,p=1$c29tZXNhbHQAAAAAAAAAAA$JTBozgKQiCn5yKAm3Hz0vUSX/XgfqhZloNCxDWmeDr0 ' ;
20
+ $ testHash = '$argon2i$v=19$m=4096,t=0 ,p=1$c29tZXNhbHQAAAAAAAAAAA$JTBozgKQiCn5yKAm3Hz0vUSX/XgfqhZloNCxDWmeDr0 ' ;
21
21
$ c = sodium_crypto_pwhash_str_verify ($ testHash , $ passwd );
22
22
var_dump ($ c );
23
23
You can’t perform that action at this time.
0 commit comments