diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2024-05-27 13:08:29 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2024-05-27 13:08:29 +0200 |
commit | 75160b12821f7f4299cce7f0b69c83c1502ae071 (patch) | |
tree | 27e25e4ccaef45f0c58b22831164050d1af1d4db /vendor/paragonie/sodium_compat/src/Core32/Curve25519/Fe.php | |
parent | prvi-commit (diff) | |
download | 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.gz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.bz2 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.lz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.xz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.zst 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.zip |
Diffstat (limited to '')
-rw-r--r-- | vendor/paragonie/sodium_compat/src/Core32/Curve25519/Fe.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Fe.php b/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Fe.php index 5fe10f7..21b3188 100644 --- a/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Fe.php +++ b/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Fe.php @@ -48,6 +48,9 @@ class ParagonIE_Sodium_Core32_Curve25519_Fe implements ArrayAccess } } else { for ($i = 0; $i < $count; ++$i) { + if (!($array[$i] instanceof ParagonIE_Sodium_Core32_Int32)) { + throw new TypeError('Expected ParagonIE_Sodium_Core32_Int32'); + } $array[$i]->overflow = 0; $obj->offsetSet($i, $array[$i]); } @@ -104,6 +107,7 @@ class ParagonIE_Sodium_Core32_Curve25519_Fe implements ArrayAccess * @throws SodiumException * @throws TypeError */ + #[ReturnTypeWillChange] public function offsetSet($offset, $value) { if (!($value instanceof ParagonIE_Sodium_Core32_Int32)) { @@ -124,6 +128,7 @@ class ParagonIE_Sodium_Core32_Curve25519_Fe implements ArrayAccess * @return bool * @psalm-suppress MixedArrayOffset */ + #[ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -136,6 +141,7 @@ class ParagonIE_Sodium_Core32_Curve25519_Fe implements ArrayAccess * @return void * @psalm-suppress MixedArrayOffset */ + #[ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); @@ -148,6 +154,7 @@ class ParagonIE_Sodium_Core32_Curve25519_Fe implements ArrayAccess * @return ParagonIE_Sodium_Core32_Int32 * @psalm-suppress MixedArrayOffset */ + #[ReturnTypeWillChange] public function offsetGet($offset) { if (!isset($this->container[$offset])) { |