ParagonIE_Sodium_Core_SecretStream_State::xorNonce

Advertisement

Syntax Syntax

ParagonIE_Sodium_Core_SecretStream_State::xorNonce( string $str )

Parameters Parameters

$str

(Required)

Return Return

(self)

Source Source

File: wp-includes/sodium_compat/src/Core/SecretStream/State.php

    public function xorNonce($str)
    {
        $this->nonce = ParagonIE_Sodium_Core_Util::xorStrings(
            $this->getNonce(),
            str_pad(
                ParagonIE_Sodium_Core_Util::substr($str, 0, 8),
                12,
                "\0",
                STR_PAD_RIGHT
            )
        );
        return $this;
    }

Advertisement

Advertisement

Leave a Reply