Syntax Syntax
Parameters Parameters
- $newKeyAndNonce
-
(Required)
Return Return
(self)
Source Source
File: wp-includes/sodium_compat/src/Core32/SecretStream/State.php
public function rekey($newKeyAndNonce)
{
$this->key = ParagonIE_Sodium_Core32_Util::substr($newKeyAndNonce, 0, 32);
$this->nonce = str_pad(
ParagonIE_Sodium_Core32_Util::substr($newKeyAndNonce, 32),
12,
"\0",
STR_PAD_RIGHT
);
return $this;
}