WordPress at Your Fingertips
function is not described

ParagonIE_Sodium_Core_SecretStream_State::__construct() public WP 1.0

ParagonIE_Sodium_Core_SecretStream_State constructor.

{} It's a method of the class: ParagonIE_Sodium_Core_SecretStream_State{}

No Hooks.

Return

null. Nothing.

Usage

$ParagonIE_Sodium_Core_SecretStream_State = new ParagonIE_Sodium_Core_SecretStream_State();
$ParagonIE_Sodium_Core_SecretStream_State->__construct( $key, $nonce );
$key(string) (required)
-
$nonce *(string null)*

Default: null

Code of ParagonIE_Sodium_Core_SecretStream_State::__construct() WP 5.8.2

public function __construct($key, $nonce = null)
{
    $this->key = $key;
    $this->counter = 1;
    if (is_null($nonce)) {
        $nonce = str_repeat("\0", 12);
    }
    $this->nonce = str_pad($nonce, 12, "\0", STR_PAD_RIGHT);;
    $this->_pad = str_repeat("\0", 4);
}