[Security/Core] work around sodium_compat issue

This commit is contained in:
Nicolas Grekas 2019-06-26 20:07:24 +02:00
parent fe5a4ee999
commit df50685abf
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ class Argon2iPasswordEncoder extends BasePasswordEncoder implements SelfSaltingE
return true;
}
return \function_exists('sodium_crypto_pwhash_str') || \extension_loaded('libsodium');
return version_compare(\extension_loaded('sodium') ? \SODIUM_LIBRARY_VERSION : phpversion('libsodium'), '1.0.9', '>=');
}
/**