Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4fed5d3

Browse filesBrowse files
[Security/Core] require libsodium >= 1.0.14
1 parent 67af93f commit 4fed5d3
Copy full SHA for 4fed5d3

File tree

Expand file treeCollapse file tree

2 files changed

+5
-9
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-9
lines changed
Open diff view settings
Collapse file

‎src/Symfony/Component/Security/Core/Encoder/NativePasswordEncoder.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Encoder/NativePasswordEncoder.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ public function __construct(int $opsLimit = null, int $memLimit = null, int $cos
3333
$opsLimit = $opsLimit ?? max(6, \defined('SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE') ? \SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE : 6);
3434
$memLimit = $memLimit ?? max(64 * 1024 * 1024, \defined('SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE') ? \SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE : 64 * 1024 * 1024);
3535

36-
if (2 > $opsLimit) {
37-
throw new \InvalidArgumentException('$opsLimit must be 2 or greater.');
36+
if (3 > $opsLimit) {
37+
throw new \InvalidArgumentException('$opsLimit must be 3 or greater.');
3838
}
3939

4040
if (10 * 1024 > $memLimit) {
Collapse file

‎src/Symfony/Component/Security/Core/Encoder/SodiumPasswordEncoder.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Encoder/SodiumPasswordEncoder.php
+3-7Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public function __construct(int $opsLimit = null, int $memLimit = null)
3737
$this->opsLimit = $opsLimit ?? max(6, \defined('SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE') ? \SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE : 6);
3838
$this->memLimit = $memLimit ?? max(64 * 1024 * 1024, \defined('SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE') ? \SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE : 64 * 1024 * 2014);
3939

40-
if (2 > $this->opsLimit) {
41-
throw new \InvalidArgumentException('$opsLimit must be 2 or greater.');
40+
if (3 > $this->opsLimit) {
41+
throw new \InvalidArgumentException('$opsLimit must be 3 or greater.');
4242
}
4343

4444
if (10 * 1024 > $this->memLimit) {
@@ -48,11 +48,7 @@ public function __construct(int $opsLimit = null, int $memLimit = null)
4848

4949
public static function isSupported(): bool
5050
{
51-
if (class_exists('ParagonIE_Sodium_Compat') && method_exists('ParagonIE_Sodium_Compat', 'crypto_pwhash_is_available')) {
52-
return \ParagonIE_Sodium_Compat::crypto_pwhash_is_available();
53-
}
54-
55-
return \function_exists('sodium_crypto_pwhash_str') || \extension_loaded('libsodium');
51+
return \function_exists('sodium_crypto_pwhash_str_needs_rehash') || \function_exists('Sodium\crypto_pwhash_str_needs_rehash');
5652
}
5753

5854
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.