wppaste
WordPress

ParagonIE_Sodium_Core_Curve25519_Fe

Source
wp-includes/sodium_compat/src/Core/Curve25519/Fe.php:12
Class ParagonIE_Sodium_Core_Curve25519_Fe

Description

This represents a Field Element

Compatibility

WordPress
core
  • 6.7.10
  • 6.8.11
  • 6.9.10
  • 7.0.7
  • 7.1.3

Present in every tracked release (6.7.10 to 7.1.3).

Properties · 2

$containerarray<int,protected
$sizeintprotected

Methods · 6

Source code

class ParagonIE_Sodium_Core_Curve25519_Fe implements ArrayAccess{    /**     * @var array<int, int>     */    protected $container = array();     /**     * @var int     */    protected $size = 10;     /**     * @internal You should not use this directly from another application     *     * @param array<int, int> $array     * @param bool $save_indexes     * @return self     */    public static function fromArray($array, $save_indexes = null)    {        $count = count($array);        if ($save_indexes) {            $keys = array_keys($array);        } else {            $keys = range(0, $count - 1);        }        $array = array_values($array);        /** @var array<int, int> $keys */         $obj = new ParagonIE_Sodium_Core_Curve25519_Fe();        if ($save_indexes) {            for ($i = 0; $i < $count; ++$i) {                $obj->offsetSet($keys[$i], $array[$i]);            }        } else {            for ($i = 0; $i < $count; ++$i) {                $obj->offsetSet($i, $array[$i]);            }        }        return $obj;    }     /**     * @internal You should not use this directly from another application     *     * @param int|null $offset     * @param int $value     * @return void     * @psalm-suppress MixedArrayOffset     */    #[ReturnTypeWillChange]    public function offsetSet($offset, $value)    {        if (!is_int($value)) {            throw new InvalidArgumentException('Expected an integer');        }        if (is_null($offset)) {            $this->container[] = $value;        } else {            $this->container[$offset] = $value;        }    }     /**     * @internal You should not use this directly from another application     *     * @param int $offset     * @return bool     * @psalm-suppress MixedArrayOffset     */    #[ReturnTypeWillChange]    public function offsetExists($offset)    {        return isset($this->container[$offset]);    }     /**     * @internal You should not use this directly from another application     *

Changelog

One change between 6.7.10 and 7.1.3.

  1. 6.7.10
  2. 6.8.11
  3. 6.9.10
  4. 7.0.7
  5. 7.1.3

Signature, return type and hooks compared across 5 parsed releases.

6.9.10
Method __construct() added.verified against source

About this page

Parsed data
Generated from the wordpress-develop 6.8.11 tag, from src/wp-includes/sodium_compat/src/Core/Curve25519/Fe.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.