ParagonIE_Sodium_Core_SecretStream_State::rekey() public WP 1.0
{} It's a method of the class: ParagonIE_Sodium_Core_SecretStream_State{}
No Hooks.
Return
self
. Null. Nothing.
Usage
$ParagonIE_Sodium_Core_SecretStream_State = new ParagonIE_Sodium_Core_SecretStream_State(); $ParagonIE_Sodium_Core_SecretStream_State->rekey( $newKeyAndNonce );
- $newKeyAndNonce(string) (required)
- -
Code of ParagonIE_Sodium_Core_SecretStream_State::rekey() ParagonIE Sodium Core SecretStream State::rekey WP 5.7.1
public function rekey($newKeyAndNonce)
{
$this->key = ParagonIE_Sodium_Core_Util::substr($newKeyAndNonce, 0, 32);
$this->nonce = str_pad(
ParagonIE_Sodium_Core_Util::substr($newKeyAndNonce, 32),
12,
"\0",
STR_PAD_RIGHT
);
return $this;
}