ParagonIE_Sodium_Core32_ChaCha20_Ctx::offsetSet

Advertisement

Syntax Syntax

ParagonIE_Sodium_Core32_ChaCha20_Ctx::offsetSet( int $offset, int|ParagonIE_Sodium_Core32_Int32 $value )

Parameters Parameters

$offset

(int) (Required)

$value

(int|ParagonIE_Sodium_Core32_Int32) (Required)

Return Return

(void)

Source Source

File: wp-includes/sodium_compat/src/Core32/ChaCha20/Ctx.php

    public function offsetSet($offset, $value)
    {
        if (!is_int($offset)) {
            throw new InvalidArgumentException('Expected an integer');
        }
        if ($value instanceof ParagonIE_Sodium_Core32_Int32) {
            /*
        } elseif (is_int($value)) {
            $value = ParagonIE_Sodium_Core32_Int32::fromInt($value);
            */
        } else {
            throw new InvalidArgumentException('Expected an integer');
        }
        $this->container[$offset] = $value;
    }

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.