ParagonIE_Sodium_Core32_SecretStream_State::getNonce

Advertisement

Syntax Syntax

ParagonIE_Sodium_Core32_SecretStream_State::getNonce()

Return Return

(string)

Source Source

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

    public function getNonce()
    {
        if (!is_string($this->nonce)) {
            $this->nonce = str_repeat("\0", 12);
        }
        if (ParagonIE_Sodium_Core32_Util::strlen($this->nonce) !== 12) {
            $this->nonce = str_pad($this->nonce, 12, "\0", STR_PAD_RIGHT);
        }
        return $this->nonce;
    }

Advertisement

Advertisement

Leave a Reply

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