WordPress at a glance
function is not described

ParagonIE_Sodium_Core32_ChaCha20_IetfCtx::__construct() public WP 1.0

ParagonIE_Sodium_Core_ChaCha20_IetfCtx constructor.

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

No Hooks.

Return

````. Null. Nothing.

Usage

$ParagonIE_Sodium_Core32_ChaCha20_IetfCtx = new ParagonIE_Sodium_Core32_ChaCha20_IetfCtx();
$ParagonIE_Sodium_Core32_ChaCha20_IetfCtx->__construct( $key, $iv, $counter );
$key(string)
ChaCha20 key.
$iv(string)
Initialization Vector (a.k.a. nonce).
$counter(string)
The initial counter value.
Default: 4 0x00 bytes

Code of ParagonIE_Sodium_Core32_ChaCha20_IetfCtx::__construct() WP 5.7

<?php
public function __construct($key = '', $iv = '', $counter = '')
{
    if (self::strlen($iv) !== 12) {
        throw new InvalidArgumentException('ChaCha20 expects a 96-bit nonce in IETF mode.');
    }
    parent::__construct($key, self::substr($iv, 0, 8), $counter);

    if (!empty($counter)) {
        $this->container[12] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($counter, 0, 4));
    }
    $this->container[13] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($iv, 0, 4));
    $this->container[14] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($iv, 4, 4));
    $this->container[15] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($iv, 8, 4));
}