10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 30f7d4f + 3898e8f commit efc19fcCopy full SHA for efc19fc
src/Symfony/Component/Security/Core/Encoder/Argon2iPasswordEncoder.php
@@ -22,9 +22,15 @@ class Argon2iPasswordEncoder extends BasePasswordEncoder implements SelfSaltingE
22
{
23
public static function isSupported()
24
25
- return (\PHP_VERSION_ID >= 70200 && \defined('PASSWORD_ARGON2I'))
26
- || \function_exists('sodium_crypto_pwhash_str')
27
- || \extension_loaded('libsodium');
+ if (\defined('PASSWORD_ARGON2I')) {
+ return true;
+ }
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');
34
}
35
36
/**
0 commit comments