WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
функция не описана

ParagonIE_Sodium_Core_Poly1305_State::update() public WP 1.0

Это метод класса: ParagonIE_Sodium_Core_Poly1305_State{}

Хуков нет.

Возвращает

self.

Использование

$ParagonIE_Sodium_Core_Poly1305_State = new ParagonIE_Sodium_Core_Poly1305_State();
$ParagonIE_Sodium_Core_Poly1305_State->update( $message );
$message(строка)

По умолчанию: ''

Код ParagonIE_Sodium_Core_Poly1305_State::update() WP 5.5.1

<?php
public function update($message = '')
{
    $bytes = self::strlen($message);
    if ($bytes < 1) {
        return $this;
    }

    /* handle leftover */
    if ($this->leftover) {
        $want = ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE - $this->leftover;
        if ($want > $bytes) {
            $want = $bytes;
        }
        for ($i = 0; $i < $want; ++$i) {
            $mi = self::chrToInt($message[$i]);
            $this->buffer[$this->leftover + $i] = $mi;
        }
        // We snip off the leftmost bytes.
        $message = self::substr($message, $want);
        $bytes = self::strlen($message);
        $this->leftover += $want;
        if ($this->leftover < ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE) {
            // We still don't have enough to run $this->blocks()
            return $this;
        }

        $this->blocks(
            self::intArrayToString($this->buffer),
            ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE
        );
        $this->leftover = 0;
    }

    /* process full blocks */
    if ($bytes >= ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE) {
        /** @var int $want */
        $want = $bytes & ~(ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE - 1);
        if ($want >= ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE) {
            $block = self::substr($message, 0, $want);
            if (self::strlen($block) >= ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE) {
                $this->blocks($block, $want);
                $message = self::substr($message, $want);
                $bytes = self::strlen($message);
            }
        }
    }

    /* store leftover */
    if ($bytes) {
        for ($i = 0; $i < $bytes; ++$i) {
            $mi = self::chrToInt($message[$i]);
            $this->buffer[$this->leftover + $i] = $mi;
        }
        $this->leftover = (int) $this->leftover + $bytes;
    }
    return $this;
}