Skip to content

Commit

Permalink
Remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Apr 19, 2024
1 parent 144bd0f commit 46206f9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Core/Ed25519.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public static function sign_detached(

try {
ParagonIE_Sodium_Compat::memzero($az);
} catch (SodiumException $ex) {
} catch (SodiumException) {
$az = null;
}
return $sig;
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Salsa20.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public static function salsa20(
}
try {
ParagonIE_Sodium_Compat::memzero($kcopy);
} catch (SodiumException $ex) {
} catch (SodiumException) {
$kcopy = null;
}
return $c;
Expand Down Expand Up @@ -237,7 +237,7 @@ public static function salsa20_xor_ic(
try {
ParagonIE_Sodium_Compat::memzero($block);
ParagonIE_Sodium_Compat::memzero($kcopy);
} catch (SodiumException $ex) {
} catch (SodiumException) {
$block = null;
$kcopy = null;
}
Expand Down
12 changes: 6 additions & 6 deletions src/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public static function box_open(
try {
ParagonIE_Sodium_Compat::memzero($nonce);
ParagonIE_Sodium_Compat::memzero($ephKeypair);
} catch (SodiumException $ex) {
} catch (SodiumException) {
if (isset($ephKeypair)) {
unset($ephKeypair);
}
Expand Down Expand Up @@ -199,7 +199,7 @@ public static function box_seal(
try {
ParagonIE_Sodium_Compat::memzero($nonce);
ParagonIE_Sodium_Compat::memzero($ephKeypair);
} catch (SodiumException $ex) {
} catch (SodiumException) {
/** @psalm-suppress PossiblyUndefinedVariable */
unset($ephKeypair);
}
Expand Down Expand Up @@ -277,7 +277,7 @@ public static function box_seal_open(
try {
ParagonIE_Sodium_Compat::memzero($nonce);
ParagonIE_Sodium_Compat::memzero($ephKeypair);
} catch (SodiumException $ex) {
} catch (SodiumException) {
if (isset($ephKeypair)) {
unset($ephKeypair);
}
Expand Down Expand Up @@ -450,7 +450,7 @@ public static function secretbox_open(
fclose($ofp);
try {
ParagonIE_Sodium_Compat::memzero($key);
} catch (SodiumException $ex) {
} catch (SodiumException) {
/** @psalm-suppress PossiblyUndefinedVariable */
unset($key);
}
Expand Down Expand Up @@ -532,7 +532,7 @@ public static function sign(

try {
ParagonIE_Sodium_Compat::memzero($az);
} catch (SodiumException $ex) {
} catch (SodiumException) {
$az = null;
}
fclose($fp);
Expand Down Expand Up @@ -786,7 +786,7 @@ protected static function secretbox_encrypt(
try {
ParagonIE_Sodium_Compat::memzero($block0);
ParagonIE_Sodium_Compat::memzero($subkey);
} catch (SodiumException $ex) {
} catch (SodiumException) {
$block0 = null;
$subkey = null;
}
Expand Down

0 comments on commit 46206f9

Please sign in to comment.