File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ interface StoreInterface
31
31
public function save (Key $ key );
32
32
33
33
/**
34
- * Waits a key becomes free, then stores the resource.
34
+ * Waits until a key becomes free, then stores the resource.
35
35
*
36
36
* If the store does not support this feature it should throw a NotSupportedException.
37
37
*
Original file line number Diff line number Diff line change @@ -22,9 +22,15 @@ class Argon2iPasswordEncoder extends BasePasswordEncoder implements SelfSaltingE
22
22
{
23
23
public static function isSupported ()
24
24
{
25
- return (\PHP_VERSION_ID >= 70200 && \defined ('PASSWORD_ARGON2I ' ))
26
- || \function_exists ('sodium_crypto_pwhash_str ' )
27
- || \extension_loaded ('libsodium ' );
25
+ if (\defined ('PASSWORD_ARGON2I ' )) {
26
+ return true ;
27
+ }
28
+
29
+ if (\class_exists ('ParagonIE_Sodium_Compat ' ) && \method_exists ('ParagonIE_Sodium_Compat ' , 'crypto_pwhash_is_available ' )) {
30
+ return \ParagonIE_Sodium_Compat::crypto_pwhash_is_available ();
31
+ }
32
+
33
+ return \function_exists ('sodium_crypto_pwhash_str ' ) || \extension_loaded ('libsodium ' );
28
34
}
29
35
30
36
/**
You can’t perform that action at this time.
0 commit comments